diff --git a/conformance_tests.yaml b/conformance_tests.yaml index 7fc2f00f..0b8dfc19 100644 --- a/conformance_tests.yaml +++ b/conformance_tests.yaml @@ -3262,6 +3262,21 @@ tags: [ command_line_tool ] id: 246 +- job: tests/listing-job.yml + tool: tests/listing_shallow3.cwl + label: listing_outputBinding_loadListing + output: + out: { + "basename": "file2", + "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709", + "class": "File", + "location": "file2", + "size": 0 + } + doc: > + Test that loadListing works when used on outputBinding. + tags: [ command_line_tool ] + - job: tests/listing-job.yml tool: tests/listing_deep1.cwl label: listing_requirement_deep diff --git a/tests/listing_shallow3.cwl b/tests/listing_shallow3.cwl new file mode 100755 index 00000000..b32e429d --- /dev/null +++ b/tests/listing_shallow3.cwl @@ -0,0 +1,21 @@ +#!/usr/bin/env cwl-runner +class: CommandLineTool +cwlVersion: v1.2 +requirements: + InlineJavascriptRequirement: {} +inputs: [] +outputs: + out: + type: File + outputBinding: + glob: "." + loadListing: shallow_listing + outputEval: |- + ${ + for (var i = 0; i < self[0].listing.length; i++) { + if (self[0].listing[i].basename == "file2") { + return self[0].listing[i]; + } + } + } +arguments: ["touch", "file1", "file2", "file3"]