Skip to content

Commit

Permalink
Added test on glob when is a list
Browse files Browse the repository at this point in the history
  • Loading branch information
LanderOtto committed Dec 18, 2024
1 parent 8512c8b commit e6d7c46
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 0 deletions.
31 changes: 31 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/dir-job1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
indir:
class: Directory
location: testdir1
18 changes: 18 additions & 0 deletions tests/glob-list.cwl
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions tests/testdir1/a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World!
2 changes: 2 additions & 0 deletions tests/testdir1/b.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1,2
3,4
1 change: 1 addition & 0 deletions tests/testdir1/c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello from Common Workflow Language!
Empty file added tests/testdir1/d
Empty file.

0 comments on commit e6d7c46

Please sign in to comment.