From c585ab433e38fb248ef4e0e040ab14f4230d3d2c Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 20 Sep 2023 09:30:27 +0100 Subject: tests: Test that rename works even on a final workflow output. * tests/ccwl.scm (print): New variable. ("rename should work even on the final output of a workflow"): New test. --- tests/ccwl.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/ccwl.scm b/tests/ccwl.scm index d99650e..f55ef0d 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -1,5 +1,5 @@ ;;; ccwl --- Concise Common Workflow Language -;;; Copyright © 2021, 2022 Arun Isaac +;;; Copyright © 2021, 2022, 2023 Arun Isaac ;;; ;;; This file is part of ccwl. ;;; @@ -111,4 +111,21 @@ #:outputs (stdout #:type stdout) #:stdin "foo" "bar")))) +;; TODO: Define this in the lexical scope of the test that requires +;; it. +(define print + (command #:inputs (message #:type string) + #:run "echo" message + #:outputs (printed-message #:type stdout))) + +(test-equal "rename should work even on the final output of a workflow" + (map output-id + (workflow-outputs + (workflow ((message1 #:type string) + (message2 #:type string)) + (tee (pipe (print (print1) #:message message1) + (rename #:out1 printed-message)) + (print (print2) #:message message2))))) + (list 'out1 'printed-message)) + (test-end "ccwl") -- cgit v1.2.3