Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test on glob when is a list #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.3.0-dev1
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.
Loading