1 USING: syndication io kernel io.files tools.test io.encodings.binary
2 calendar urls xml.writer ;
5 : load-news-file ( filename -- feed )
6 ! Load an news syndication file and process it, returning
8 binary file-contents parse-feed ;
14 URL" http://meerkat.oreillynet.com"
19 "XML: A Disruptive Technology"
20 URL" http://c.moreover.com/click/here.pl?r123"
21 "\n XML is placing increasingly heavy loads on the existing technical\n infrastructure of the Internet.\n "
25 } } [ "vocab:syndication/test/rss1.xml" load-news-file ] unit-test
30 URL" http://example.org/"
35 "Atom draft-07 snapshot"
36 URL" http://example.org/2005/04/02/atom"
37 "\n <div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p><i>[Update: The Atom draft is finished.]</i></p>\n </div>\n "
39 T{ timestamp f 2003 12 13 8 29 29 T{ duration f 0 0 0 -4 0 0 } }
42 } } [ "vocab:syndication/test/atom.xml" load-news-file ] unit-test
43 { t } [ "vocab:syndication/test/atom.xml" load-news-file dup feed>xml xml>feed = ] unit-test