aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2023-10-16 13:12:54 +0100
committerArun Isaac2023-10-16 13:14:10 +0100
commit2a3ba9b993575da807ecf0f99a5c77ab5076a003 (patch)
tree5673812487e7ce9732cdad18abb15c3065549ea9 /tests
parentcb66af826596b7bfba0fa45f8eb25fcf1613bc13 (diff)
downloadccwl-2a3ba9b993575da807ecf0f99a5c77ab5076a003.tar.gz
ccwl-2a3ba9b993575da807ecf0f99a5c77ab5076a003.tar.lz
ccwl-2a3ba9b993575da807ecf0f99a5c77ab5076a003.zip
tests: Allow literal ints as arguments.
* tests/ccwl.scm ("allow literal as arguments"): Rename to "allow literal strings as arguments". (print-int): New variable. ("allow literal ints as arguments"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/ccwl.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index e7a0cb7..2f3f88d 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -163,10 +163,21 @@
#:message message)))
#f)))
-(test-assert "allow literals as arguments"
+(test-assert "allow literal strings as arguments"
(workflow ()
(print #:message "Hello")))
+;; TODO: Define this in the lexical scope of the test that requires
+;; it.
+(define print-int
+ (command #:inputs (number #:type int)
+ #:run "echo" number
+ #:outputs (printed-number #:type stdout)))
+
+(test-assert "allow literal ints as arguments"
+ (workflow ()
+ (print-int #:number 42)))
+
(test-assert "step supplied with an unknown key must raise a &ccwl-violation condition"
(guard (exception
(else (ccwl-violation? exception)))