diff --git a/conformance_tests.yaml b/conformance_tests.yaml index 42a92557..ffc56074 100644 --- a/conformance_tests.yaml +++ b/conformance_tests.yaml @@ -3461,3 +3461,15 @@ } } tags: [ required, command_line_tool ] + +- id: default_with_falsey_value + job: tests/empty.json + tool: tests/default_with_falsey_value.cwl + doc: Confirms that "false"-like (but not 'null') values override any default + output: + out: + class: File + basename: file.txt + size: 14 + checksum: sha1$0074b1841ab5103cc0442f739d9fb41a33b602ee + tags: [ step_input, workflow ] \ No newline at end of file diff --git a/tests/default_with_falsey_value.cwl b/tests/default_with_falsey_value.cwl new file mode 100644 index 00000000..28ea09fc --- /dev/null +++ b/tests/default_with_falsey_value.cwl @@ -0,0 +1,39 @@ +cwlVersion: v1.0 +class: Workflow + +doc: reproduces https://github.com/DataBiosphere/toil/issues/3141 + +requirements: + StepInputExpressionRequirement: {} + +inputs: + input_bool: + type: boolean + default: False + +outputs: + out: + type: File + outputSource: echo/out + +steps: + echo: + run: + cwlVersion: v1.0 + class: CommandLineTool + baseCommand: echo + inputs: + str: + type: string + default: "UNDEFINED" + inputBinding: + position: 1 + outputs: + out: stdout + stdout: file.txt + in: + str: + source: input_bool + valueFrom: self is $(self) + out: + - out