summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/readers/rss-2.test19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/readers/rss-2.test b/tests/readers/rss-2.test
index 53e2b8c..64eccea 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, 2009  Ludovic Courtès <ludo@gnu.org>
+;;; Copyright (C) 2008, 2009, 2012  Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of Skribilo.
 ;;;
@@ -20,7 +20,8 @@
 (define-module (tests rss-2)
   :use-module (ice-9 match)
   :use-module (skribilo reader)
-  :use-module (srfi srfi-64))
+  :use-module (srfi srfi-64)
+  :use-module (ice-9 syncase))
 
 (if (or (not (false-if-exception (resolve-interface '(sxml simple))))
         (not (false-if-exception (resolve-interface '(htmlprag)))))
@@ -29,12 +30,14 @@
 (define %rss2-read #f)
 
 
-(define-macro (test-match name pattern xml)
-  ;; Test whether the RSS feed in XML matches PATTERN.
-  `(test-equal ,name #t
-     (match (%rss2-read (open-input-string ,xml))
-       (,pattern #t)
-       (_        #f))))
+(define-syntax test-match
+  (syntax-rules ()
+    ((_ name pattern xml)
+     ;; Test whether the RSS feed in XML matches PATTERN.
+     (test-assert name
+       (match (%rss2-read (open-input-string xml))
+         (pattern #t)
+         (_       #f))))))