summaryrefslogtreecommitdiff
path: root/tests/readers/rss-2.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/readers/rss-2.test')
-rw-r--r--tests/readers/rss-2.test62
1 files changed, 59 insertions, 3 deletions
diff --git a/tests/readers/rss-2.test b/tests/readers/rss-2.test
index 99ddf58..53e2b8c 100644
--- a/tests/readers/rss-2.test
+++ b/tests/readers/rss-2.test
@@ -1,6 +1,6 @@
;;; Excercise RSS 2.0 reader. -*- Scheme -*-
;;;
-;;; Copyright (C) 2008 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright (C) 2008, 2009 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of Skribilo.
;;;
@@ -48,7 +48,7 @@
(test-match "basic"
`(document ,'#:title (list "The Channel")
(chapter ,'#:title (list "Foo Bar")
- ,_
+ ,_ ;; the date
(list "Hello world.")))
"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>
@@ -69,7 +69,7 @@
(test-match "with HTML markup"
`(document ,'#:title (list (emph "The") " Channel")
(chapter ,'#:title (list "Foo " (bold "&") " Bar")
- ,_
+ ,_ ;; the date
(list (p "Hello world."))))
"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>
@@ -87,6 +87,62 @@
</channel>
</rss>")
+(test-match "broken date format"
+ `(document ,'#:title (list "The Channel")
+ (chapter ,'#:title (list "Foo Bar")
+ ,_ ;; the date
+ (list "Hello world.")))
+
+"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>
+ <rss version=\"2.0\">
+ <channel>
+ <title>The Channel</title>
+ <link>http://example.net/</link>
+ <description>Some channel description...</description>
+
+ <item>
+ <title>Foo Bar</title>
+ <!-- Feeds at livejournal.com, e.g.,
+ http://udrepper.livejournal.com/rss.xml contain a broken date with,
+ e.g., \"GMT\" instead of \"+0000\". -->
+ <pubDate>Mon, 06 Jun 2005 23:05:00 GMT</pubDate>
+ <description>Hello world.</description>
+ </item>
+ </channel>
+ </rss>")
+
+(test-match "table"
+ `(document ,'#:title (list "The Channel")
+ (chapter ,'#:title (list "Foo Bar")
+ ,_ ;; the date
+ (list
+ ,_ ,_ ;; whitespace
+ (table
+ (th (td "Foo") (td "Bar"))
+ (tr (td "001") (td "002")))
+ ,_ ,_ ;; whitespace
+ )))
+
+"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>
+ <rss version=\"2.0\">
+ <channel>
+ <title>The Channel</title>
+ <link>http://example.net/</link>
+ <description>Some channel description...</description>
+
+ <item>
+ <title>Foo Bar</title>
+ <pubDate>Mon, 06 Jun 2005 23:05:00 +0200</pubDate>
+ <description>
+ &lt;table&gt;
+ &lt;th&gt;&lt;td&gt;Foo&lt;/td&gt;&lt;td&gt;Bar&lt;/td&gt;&lt;/th&gt;
+ &lt;tr&gt;&lt;td&gt;001&lt;/td&gt;&lt;td&gt;002&lt;/td&gt;&lt;/tr&gt;
+ &lt;/table&gt;
+ </description>
+ </item>
+ </channel>
+ </rss>")
+
(test-end "rss-2")