Skip to content

Commit

Permalink
Add test for optional numeric output returning 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdang989 committed May 28, 2019
1 parent 5f4ebe5 commit 46a4c91
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3304,3 +3304,12 @@
tags: [ required, command_line_tool ]
id: 252

- tool: tests/optional-numerical-output-0.cwl
job: tests/empty.json
output:
{"out": 0}
label: optional_numerical_output_returns_0_not_null
doc: |
Test that optional number output is returned as 0, not null
tags: [ required, command_line_tool ]
id: 253
16 changes: 16 additions & 0 deletions tests/optional-numerical-output-0.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cwlVersion: v1.0
class: CommandLineTool
baseCommand:
- echo
- "0"
stdout: a.txt
requirements:
- class: InlineJavascriptRequirement
inputs: []
outputs:
out:
type: float?
outputBinding:
glob: "a.txt"
loadContents: true
outputEval: "${\n return parseFloat(self[0].contents);\n}"

0 comments on commit 46a4c91

Please sign in to comment.