summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ccwl.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index 2f3f88d..334633b 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -232,4 +232,24 @@
                       #:stdout captured-stdout))
            #f)))
 
+(test-assert "command definitions with undefined inputs in their #:run arguments must raise a &ccwl-violation condition"
+  (guard (exception
+          (else (and (ccwl-violation? exception)
+                     (string=? (formatted-message-format exception)
+                               "Undefined input ~a"))))
+    (begin (macroexpand
+            '(command #:inputs (number #:type int)
+                      #:run "echo" n))
+           #f)))
+
+(test-assert "command definitions with undefined prefix inputs in their #:run arguments must raise a &ccwl-violation condition"
+  (guard (exception
+          (else (and (ccwl-violation? exception)
+                     (string=? (formatted-message-format exception)
+                               "Undefined input ~a"))))
+    (begin (macroexpand
+            '(command #:inputs (number #:type int)
+                      #:run "echo" ("-x" n)))
+           #f)))
+
 (test-end "ccwl")