Skip to content

Commit 2cb1dcc

Browse files
authored
This commit adds a new test on the valueFrom by concatenating two inputs (#76)
1 parent 7083869 commit 2cb1dcc

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

conformance_tests.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,13 @@
909909
doc: Test valueFrom on workflow step referencing other inputs
910910
tags: [ step_input, inline_javascript, workflow ]
911911

912+
- job: tests/step-valuefrom-job.json
913+
output: {val: "a_1.b_2\n"}
914+
tool: tests/step-valuefrom6-wf.cwl
915+
id: valuefrom_wf_step_concat
916+
doc: Test valueFrom on workflow step by concatenating different inputs.
917+
tags: [ step_input, inline_javascript, workflow ]
918+
912919
- job: tests/record-output-job.json
913920
output:
914921
"orec": {

tests/step-valuefrom6-wf.cwl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.3.0-dev1
4+
requirements:
5+
- class: StepInputExpressionRequirement
6+
- class: InlineJavascriptRequirement
7+
8+
inputs:
9+
a: int
10+
b: int
11+
12+
outputs:
13+
val:
14+
type: string
15+
outputSource: step1/echo_out
16+
17+
steps:
18+
step1:
19+
run:
20+
id: echo
21+
class: CommandLineTool
22+
inputs:
23+
c:
24+
type: string
25+
inputBinding: {}
26+
outputs:
27+
echo_out:
28+
type: string
29+
outputBinding:
30+
glob: "step1_out"
31+
loadContents: true
32+
outputEval: $(self[0].contents)
33+
baseCommand: "echo"
34+
stdout: step1_out
35+
36+
in:
37+
a: a
38+
b: b
39+
c:
40+
valueFrom: "a_$(inputs.a).b_$(inputs.b)"
41+
out: [echo_out]

0 commit comments

Comments
 (0)