aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ccwl.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index 76bcecd..e7a0cb7 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -197,4 +197,28 @@
(print (print2) #:message message2)))
#f)))
+(test-assert "commands with non-string #:stderr parameters must raise a &ccwl-violation condition"
+ (guard (exception
+ (else (and (ccwl-violation? exception)
+ (string=? (formatted-message-format exception)
+ "#:stderr parameter must be a string"))))
+ (begin (macroexpand
+ '(command #:inputs (message #:type string)
+ #:run "echo" message
+ #:outputs (printed #:type stderr)
+ #:stderr captured-stderr))
+ #f)))
+
+(test-assert "commands with non-string #:stdout parameters must raise a &ccwl-violation condition"
+ (guard (exception
+ (else (and (ccwl-violation? exception)
+ (string=? (formatted-message-format exception)
+ "#:stdout parameter must be a string"))))
+ (begin (macroexpand
+ '(command #:inputs (message #:type string)
+ #:run "echo" message
+ #:outputs (printed #:type stdout)
+ #:stdout captured-stdout))
+ #f)))
+
(test-end "ccwl")