Update to use new test framework.
authorChris Hanson <org/chris-hanson/cph>
Sun, 30 May 2010 11:09:06 +0000 (04:09 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 30 May 2010 11:09:06 +0000 (04:09 -0700)
tests/runtime/test-regsexp.scm

index 1b7bb04d48bf7fe8358c52bc962f97d8240a150a..be92a3f3d2a887d89dd8cc075218575f4e60964c 100644 (file)
@@ -31,15 +31,15 @@ USA.
   (regsexp-match-string (compile-regsexp pattern) string))
 
 (define ((match-string-test pattern string expected))
-  (let ((thunk (lambda () (match-string pattern string)))
-       (expr `(match-string ',pattern ,string)))
-    (if (eq? expected 'PATTERN-ERROR)
-       (assert-error thunk
-                     (list condition-type:compile-regsexp)
-                     'EXPRESSION error)
-       (assert-equal (thunk)
-                     expected
-                     'EXPRESSION expr))))
+  (let ((thunk (lambda () (match-string pattern string))))
+    (run-sub-test
+     (lambda ()
+       (with-test-properties
+          (lambda ()
+            (if (eq? expected 'PATTERN-ERROR)
+                (assert-error thunk (list condition-type:compile-regsexp))
+                (assert-equal (thunk) expected)))
+        'EXPRESSION `(match-string ',pattern ,string))))))
 
 (define (match-strings-test pattern entries)
   (map (lambda (p)