summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2023-09-29 13:58:50 +0100
committerArun Isaac2023-09-29 13:58:50 +0100
commit900ecf10e030393653592b4200d2582b15158454 (patch)
tree97ae846ebf9ced2920e45a0b3cd413d4611603e2 /tests
parentd58e5585b62bd284a7e27045e748c2cf1d31a649 (diff)
downloadccwl-900ecf10e030393653592b4200d2582b15158454.tar.gz
ccwl-900ecf10e030393653592b4200d2582b15158454.tar.lz
ccwl-900ecf10e030393653592b4200d2582b15158454.zip
ccwl: Allow steps with unspecified default arguments.
* ccwl/ccwl.scm (function-inputs): New function. (function-input-keys): Use function-inputs. (collect-steps): Do not error out on steps with unspecified default arguments. * tests/ccwl.scm (print-with-default): New variable. ("allow steps with unspecified default arguments"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/ccwl.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index f55ef0d..9aa00f3 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -128,4 +128,15 @@
(print (print2) #:message message2)))))
(list 'out1 'printed-message))
+;; TODO: Define this in the lexical scope of the test that requires
+;; it.
+(define print-with-default
+ (command #:inputs (message #:type string #:default "Hello")
+ #:run "echo" message
+ #:outputs (printed-message #:type stdout)))
+
+(test-assert "allow steps with unspecified default arguments"
+ (workflow ()
+ (print-with-default)))
+
(test-end "ccwl")