From 9f601fc3f131e82e1ee5791783d330bddde468d2 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 23 Nov 2023 17:49:45 +0000 Subject: ccwl: Implement item separators for array inputs. * ccwl/ccwl.scm ()[separator]: New field. * ccwl/ccwl.scm (run-arg-position, run-args): Support array input specifiers. (run-arg-separator): New function. (command): Set separator on input objects. * ccwl/cwl.scm (input->cwl-scm): Serialize itemSeparator. * tests/ccwl.scm ("commands with non-string #:separator parameters must raise a &ccwl-violation condition"): New test. * doc/ccwl.skb (Cookbook)[Array input item separators]: New section. * doc/array-input-item-separators.scm: New file. --- tests/ccwl.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/ccwl.scm') diff --git a/tests/ccwl.scm b/tests/ccwl.scm index e876912..d3e1a96 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -308,4 +308,11 @@ '(workflow ((foo #:type string)) (rename #:bar foobar)))) +(test-condition "commands with non-string #:separator parameters must raise a &ccwl-violation condition" + (ccwl-violation-with-message? + "Invalid #:separator parameter ~a. #:separator parameter must be a string.") + (macroexpand + '(command #:inputs (messages #:type (array string)) + #:run "echo" (array messages #:separator foo)))) + (test-end "ccwl") -- cgit v1.2.3