Skip to content

Commit d7b69a1

Browse files
committed
Add a conformance test for InlineJavascriptRequirement with an input record
1 parent 64968dc commit d7b69a1

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

conformance_tests.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,3 +3532,14 @@
35323532
doc: |
35333533
Use of $(runtime.outdir) for outputBinding glob.
35343534
tags: [ required, command_line_tool ]
3535+
3536+
- label: js-input-record
3537+
# The output does not have the last \n due to the -n passed to echo
3538+
output: {
3539+
"out": "JS\nwith\nrecord"
3540+
}
3541+
tool: tests/js-input-record.cwl
3542+
job: tests/js-input-record.json
3543+
doc: |
3544+
A test case for JS with an input record.
3545+
tags: [ inline_javascript, command_line_tool ]

tests/js-input-record.cwl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
cwlVersion: v1.0
2+
3+
class: CommandLineTool
4+
5+
requirements:
6+
- class: InlineJavascriptRequirement
7+
8+
baseCommand: ['echo']
9+
10+
inputs:
11+
message:
12+
type:
13+
type: record
14+
name: message_object
15+
fields:
16+
text:
17+
type: string
18+
inputBinding:
19+
position: 1
20+
newlines:
21+
type: boolean?
22+
inputBinding:
23+
position: 0
24+
prefix: -n
25+
26+
outputs:
27+
out:
28+
type: string
29+
outputBinding:
30+
glob: output.txt
31+
loadContents: true
32+
outputEval: $(self[0].contents)
33+
stdout: output.txt

tests/js-input-record.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"message": {
3+
"text": "JS\nwith\nrecord",
4+
"newlines": true
5+
}
6+
}
7+

0 commit comments

Comments
 (0)