Skip to content

Commit d50fad0

Browse files
authored
default_with_falsey_value (#48)
1 parent 4a715dd commit d50fad0

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

conformance_tests.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3461,3 +3461,15 @@
34613461
}
34623462
}
34633463
tags: [ required, command_line_tool ]
3464+
3465+
- id: default_with_falsey_value
3466+
job: tests/empty.json
3467+
tool: tests/default_with_falsey_value.cwl
3468+
doc: Confirms that "false"-like (but not 'null') values override any default
3469+
output:
3470+
out:
3471+
class: File
3472+
basename: file.txt
3473+
size: 14
3474+
checksum: sha1$0074b1841ab5103cc0442f739d9fb41a33b602ee
3475+
tags: [ step_input, workflow ]

tests/default_with_falsey_value.cwl

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
cwlVersion: v1.0
2+
class: Workflow
3+
4+
doc: reproduces https://github.com/DataBiosphere/toil/issues/3141
5+
6+
requirements:
7+
StepInputExpressionRequirement: {}
8+
9+
inputs:
10+
input_bool:
11+
type: boolean
12+
default: False
13+
14+
outputs:
15+
out:
16+
type: File
17+
outputSource: echo/out
18+
19+
steps:
20+
echo:
21+
run:
22+
cwlVersion: v1.0
23+
class: CommandLineTool
24+
baseCommand: echo
25+
inputs:
26+
str:
27+
type: string
28+
default: "UNDEFINED"
29+
inputBinding:
30+
position: 1
31+
outputs:
32+
out: stdout
33+
stdout: file.txt
34+
in:
35+
str:
36+
source: input_bool
37+
valueFrom: self is $(self)
38+
out:
39+
- out

0 commit comments

Comments
 (0)