]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/syndication/syndication-tests.factor
io.streams.tee: more tests
[factor.git] / basis / syndication / syndication-tests.factor
index 3ea037352c6b711300740185b993ee18530f9ddc..5e63aefd205193dcab21a8c3060bf62147307a97 100644 (file)
@@ -2,15 +2,12 @@ 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.
+    ! Load an news syndication file and process it, returning
+    ! it as an feed tuple.
     binary file-contents parse-feed ;
 
-[ T{
+{ T{
     feed
     f
     "Meerkat"
@@ -25,8 +22,8 @@ IN: syndication.tests
             f
         }
     }
-} ] [ "vocab: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"
@@ -42,5 +39,5 @@ IN: syndication.tests
             T{ timestamp f 2003 12 13 8 29 29 T{ duration f 0 0 0 -4 0 0 } }
         }
     }
-} ] [ "vocab:syndication/test/atom.xml" load-news-file ] unit-test
-[ ] [ "vocab:syndication/test/atom.xml" load-news-file feed>xml xml>string drop ] 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