diff options
author | Arun Isaac | 2023-10-16 15:30:55 +0100 |
---|---|---|
committer | Arun Isaac | 2023-10-16 15:30:55 +0100 |
commit | bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe (patch) | |
tree | 52ea9959d07e9572f85d0fd9e93ffc038ca0d080 /tests | |
parent | 5e774d8f08d9a89352873289d856d0d5c2a47f41 (diff) | |
download | ccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.tar.gz ccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.tar.lz ccwl-bb6b3e677cc35c8f55d8e167b2c35b915e3a8dfe.zip |
ccwl: Raise &ccwl-violation on invalid command #:run arguments.
* ccwl/ccwl.scm (command): Raise &ccwl-violation on invalid command
#:run arguments.
* tests/ccwl.scm ("command definitions with invalid #:run arguments
must raise a &ccwl-violation condition"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ccwl.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm index 334633b..aef2a85 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -252,4 +252,13 @@ #:run "echo" ("-x" n))) #f))) +(test-assert "command definitions with invalid #:run arguments must raise a &ccwl-violation condition" + (guard (exception + (else (and (ccwl-violation? exception) + (string=? (formatted-message-format exception) + "Invalid command element ~a. Command elements must either be input identifiers or literal strings.")))) + (begin (macroexpand + '(command #:run "echo" 42)) + #f))) + (test-end "ccwl") |