From fd9a9dc8ff1c4b7e77a28b4556e62620d15b1293 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 5 Jan 2009 16:15:50 +0100 Subject: rss-2: Improve tests. * tests/readers/rss-2.test ("broken date format", "table"): New tests. --- tests/readers/rss-2.test | 62 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) (limited to 'tests') 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 +;;; Copyright (C) 2008, 2009 Ludovic Courtès ;;; ;;; 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."))) " @@ -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.")))) " @@ -87,6 +87,62 @@ ") +(test-match "broken date format" + `(document ,'#:title (list "The Channel") + (chapter ,'#:title (list "Foo Bar") + ,_ ;; the date + (list "Hello world."))) + +" + + + The Channel + http://example.net/ + Some channel description... + + + Foo Bar + + Mon, 06 Jun 2005 23:05:00 GMT + Hello world. + + + ") + +(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 + ))) + +" + + + The Channel + http://example.net/ + Some channel description... + + + Foo Bar + Mon, 06 Jun 2005 23:05:00 +0200 + + <table> + <th><td>Foo</td><td>Bar</td></th> + <tr><td>001</td><td>002</td></tr> + </table> + + + + ") + (test-end "rss-2") -- cgit v1.2.3