From 7dbe776cb56803d9c66a847f5ac3613366754838 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 9 Oct 2023 14:51:56 +0100 Subject: ccwl: Error out if steps with expression commands have no identifier. * ccwl/ccwl.scm (collect-steps): Error out if steps with expressions that evaluate to commands have no identifier. * tests/ccwl.scm ("step with expression that evaluates to a command but without a step identifier must raise a &ccwl-violation condition"): New test. --- tests/ccwl.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/ccwl.scm b/tests/ccwl.scm index 2207200..4f10450 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -145,4 +145,13 @@ (print) #:message message))) +(test-assert "step with expression that evaluates to a command but without a step identifier must raise a &ccwl-violation condition" + (guard (exception + (else (ccwl-violation? exception))) + (begin (macroexpand + '(workflow ((message #:type string)) + ((and #t print) + #:message message))) + #f))) + (test-end "ccwl") -- cgit v1.2.3