Skip to content

Commit 4e24494

Browse files
author
Peter Amstutz
committed
Test that missing parameters are explicitly set to null.
1 parent 0b31629 commit 4e24494

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

v1.0/conformance_test_v1.0.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,3 +1065,15 @@
10651065
}
10661066
tool: v1.0/recursive-input-directory.cwl
10671067
doc: Test if a writable input directory is recursivly copied and writable
1068+
1069+
- output:
1070+
out: "t\n"
1071+
job: v1.0/empty.json
1072+
tool: v1.0/null-defined.cwl
1073+
doc: Test that missing parameters are null (not undefined) in expression
1074+
1075+
- output:
1076+
out: "f\n"
1077+
job: v1.0/cat-job.json
1078+
tool: v1.0/null-defined.cwl
1079+
doc: Test that provided parameter is not null in expression

v1.0/v1.0/null-defined.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cwlVersion: v1.0
2+
class: CommandLineTool
3+
requirements:
4+
InlineJavascriptRequirement: {}
5+
inputs:
6+
file1: File?
7+
outputs:
8+
out:
9+
type: string
10+
outputBinding:
11+
glob: out.txt
12+
loadContents: true
13+
outputEval: $(self[0].contents)
14+
stdout: out.txt
15+
arguments: [echo, '$(inputs.file1 === null ? "t" : "f")']

v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,3 +1070,15 @@
10701070
}
10711071
tool: v1.1.0-dev1/recursive-input-directory.cwl
10721072
doc: Test if a writable input directory is recursivly copied and writable
1073+
1074+
- output:
1075+
out: "t\n"
1076+
job: v1.1.0-dev1/empty.json
1077+
tool: v1.1.0-dev1/null-defined.cwl
1078+
doc: Test that missing parameters are null (not undefined) in expression
1079+
1080+
- output:
1081+
out: "f\n"
1082+
job: v1.1.0-dev1/cat-job.json
1083+
tool: v1.1.0-dev1/null-defined.cwl
1084+
doc: Test that provided parameter is not null in expression

0 commit comments

Comments
 (0)