Skip to content

Commit

Permalink
default_with_falsey_value (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c authored Jun 5, 2023
1 parent 4a715dd commit d50fad0
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
12 changes: 12 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
39 changes: 39 additions & 0 deletions tests/default_with_falsey_value.cwl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d50fad0

Please sign in to comment.