From c6f93afa1665b2f000c812bc028b78043c5231de Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Feb 2012 00:29:20 +0100 Subject: tests: Use `syntax-rules' in `rss-2.test'. * tests/readers/rss-2.test (test-match): Rewrite using `syntax-rules'. --- tests/readers/rss-2.test | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'tests/readers/rss-2.test') 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 +;;; Copyright (C) 2008, 2009, 2012 Ludovic Courtès ;;; ;;; 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)))))) -- cgit v1.2.3