From 2853ef38886e3ffd7f12252ab17fb2d4e29614e2 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 17 Oct 2023 19:16:50 +0100 Subject: ccwl: Support staging input files. * ccwl/ccwl.scm ()[stage?]: New field. * ccwl/ccwl.scm (input): Add #:stage argument. * ccwl/cwl.scm (command->cwl-scm): Serialize requirements for staged inputs. * doc/ccwl.skb (Cookbook)[Stage input files]: New section. * tests/ccwl.scm ("inputs with an invalid #:stage? parameter must raise a &ccwl-violation condition"): New test. --- tests/ccwl.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/ccwl.scm b/tests/ccwl.scm index b26e854..e60a035 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -274,4 +274,15 @@ #:run "echo" (-x number))) #f))) +(test-assert "inputs with an invalid #:stage? parameter must raise a &ccwl-violation condition" + (guard (exception + (else (and (ccwl-violation? exception) + (string=? (formatted-message-format exception) + "Invalid #:stage? parameter ~a. #:stage? must either be #t or #f.")))) + (begin (macroexpand + '(command #:inputs (file #:type File + #:stage? 42) + #:run "cat" file)) + #f))) + (test-end "ccwl") -- cgit v1.2.3