-USING: syndication io kernel io.files tools.test io.encodings.utf8
-calendar urls ;
+USING: syndication io kernel io.files tools.test io.encodings.binary
+calendar urls xml.writer ;
IN: syndication.tests
-\ download-feed must-infer
-\ feed>xml must-infer
-
: load-news-file ( filename -- feed )
- #! Load an news syndication file and process it, returning
- #! it as an feed tuple.
- utf8 file-contents string>feed ;
+ ! Load an news syndication file and process it, returning
+ ! it as an feed tuple.
+ binary file-contents parse-feed ;
-[ T{
+{ T{
feed
f
"Meerkat"
f
}
}
-} ] [ "resource:basis/syndication/test/rss1.xml" load-news-file ] unit-test
-[ T{
+} } [ "vocab:syndication/test/rss1.xml" load-news-file ] unit-test
+{ T{
feed
f
"dive into mark"
T{ timestamp f 2003 12 13 8 29 29 T{ duration f 0 0 0 -4 0 0 } }
}
}
-} ] [ "resource:basis/syndication/test/atom.xml" load-news-file ] unit-test
+} } [ "vocab:syndication/test/atom.xml" load-news-file ] unit-test
+{ t } [ "vocab:syndication/test/atom.xml" load-news-file dup feed>xml xml>feed = ] unit-test