summaryrefslogtreecommitdiffstats
path: root/tests/common.tl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common.tl')
-rw-r--r--tests/common.tl6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/common.tl b/tests/common.tl
index 57f411fa..8e73faee 100644
--- a/tests/common.tl
+++ b/tests/common.tl
@@ -95,3 +95,9 @@
(progn ,*body)
(close-stream ,stream-var)
(remove-path ,name-var))))
+
+(defmacro otest (expr expected-output)
+ ^(vtest (with-out-string-stream (*stdout*) ,expr) ',expected-output))
+
+(defmacro motest (. pairs)
+ ^(progn ,*(mapcar (op cons 'otest) (tuples 2 pairs))))