diff --git a/conformance_tests.yaml b/conformance_tests.yaml index 8d397d7..62ff9df 100644 --- a/conformance_tests.yaml +++ b/conformance_tests.yaml @@ -3393,6 +3393,37 @@ } tags: [ required, command_line_tool ] +- id: glob_list + tool: tests/glob-list.cwl + job: tests/dir-job1.yml + doc: Test the glob can be a list + output: { + "result": [ + { + "basename": "a.txt", + "checksum": "sha1$2ef7bde608ce5404e97d5f042f95f89f1c232871", + "class": "File", + "location": Any, + "size": 12 + }, + { + "basename": "c.txt", + "checksum": "sha1$64d7a4802661604891785536e490635a8406f103", + "class": "File", + "location": Any, + "size": 36 + }, + { + "basename": "b.csv", + "checksum": "sha1$34bd0059091490789ffcd3fe421df8d4e5388b76", + "class": "File", + "location": Any, + "size": 7 + } + ] + } + tags: [ required, command_line_tool ] + - id: capture_files tool: tests/capture-files.cwl job: tests/dir-job.yml diff --git a/tests/dir-job1.yml b/tests/dir-job1.yml new file mode 100644 index 0000000..ce6a8f8 --- /dev/null +++ b/tests/dir-job1.yml @@ -0,0 +1,3 @@ +indir: + class: Directory + location: testdir1 \ No newline at end of file diff --git a/tests/glob-list.cwl b/tests/glob-list.cwl new file mode 100644 index 0000000..859bd8a --- /dev/null +++ b/tests/glob-list.cwl @@ -0,0 +1,18 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: [cp, -r] +arguments: + - position: 2 + valueFrom: $(runtime.outdir) +inputs: + indir: + type: Directory + inputBinding: + position: 1 +outputs: + result: + type: File[] + outputBinding: + glob: + - "$(inputs.indir.basename)/*.txt" + - "$(inputs.indir.basename)/*.csv" diff --git a/tests/testdir1/a.txt b/tests/testdir1/a.txt new file mode 100644 index 0000000..c57eff5 --- /dev/null +++ b/tests/testdir1/a.txt @@ -0,0 +1 @@ +Hello World! \ No newline at end of file diff --git a/tests/testdir1/b.csv b/tests/testdir1/b.csv new file mode 100644 index 0000000..10c7368 --- /dev/null +++ b/tests/testdir1/b.csv @@ -0,0 +1,2 @@ +1,2 +3,4 \ No newline at end of file diff --git a/tests/testdir1/c.txt b/tests/testdir1/c.txt new file mode 100644 index 0000000..9eb9e55 --- /dev/null +++ b/tests/testdir1/c.txt @@ -0,0 +1 @@ +Hello from Common Workflow Language! \ No newline at end of file diff --git a/tests/testdir1/d b/tests/testdir1/d new file mode 100644 index 0000000..e69de29