Skip to content

Commit c0a487c

Browse files
tetronmr-c
authored andcommitted
Add test for loadListing on outputBinding.
1 parent 76ed6a9 commit c0a487c

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

conformance_tests.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,21 @@
32623262
tags: [ command_line_tool ]
32633263
id: 246
32643264

3265+
- job: tests/listing-job.yml
3266+
tool: tests/listing_shallow3.cwl
3267+
label: listing_outputBinding_loadListing
3268+
output:
3269+
out: {
3270+
"basename": "file2",
3271+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
3272+
"class": "File",
3273+
"location": "file2",
3274+
"size": 0
3275+
}
3276+
doc: >
3277+
Test that loadListing works when used on outputBinding.
3278+
tags: [ command_line_tool ]
3279+
32653280
- job: tests/listing-job.yml
32663281
tool: tests/listing_deep1.cwl
32673282
label: listing_requirement_deep

tests/listing_shallow3.cwl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.2
4+
requirements:
5+
InlineJavascriptRequirement: {}
6+
inputs: []
7+
outputs:
8+
out:
9+
type: File
10+
outputBinding:
11+
glob: "."
12+
loadListing: shallow_listing
13+
outputEval: |-
14+
${
15+
for (var i = 0; i < self[0].listing.length; i++) {
16+
if (self[0].listing[i].basename == "file2") {
17+
return self[0].listing[i];
18+
}
19+
}
20+
}
21+
arguments: ["touch", "file1", "file2", "file3"]

0 commit comments

Comments
 (0)