Skip to content

Commit c0c31c5

Browse files
committed
Test that colons are allowed in several places
1 parent 130516a commit c0c31c5

File tree

6 files changed

+89
-0
lines changed

6 files changed

+89
-0
lines changed

conformance_tests.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3432,3 +3432,38 @@
34323432
label: directory_literal_with_literal_file_in_subdir_nostdin
34333433
doc: Test non-stdin reference to literal File via a nested Directory literal
34343434
tags: [ command_line_tool, required ]
3435+
3436+
- label: colon_in_paths
3437+
output:
3438+
log:
3439+
class: File
3440+
basename: re:sult
3441+
checksum: sha1$d7d6491030bfa0ce17bab3a648e603f2a55bf503
3442+
size: 14
3443+
result:
3444+
class: Directory
3445+
basename: A:Gln2Cys_result
3446+
listing:
3447+
- basename: A:Gln2Cys
3448+
checksum: sha1$2928c9c6fa02098aee8c31bf44099f3bf8c91013
3449+
class: File
3450+
size: 18
3451+
job: tests/colon:test:job.yaml
3452+
tool: tests/colon:test.cwl
3453+
doc: Confirm that colons are tolerated in input paths, string values, stdout shortcut, and output file & directory names
3454+
tags: [ required, command_line_tool ]
3455+
3456+
- label: colon_in_output_path
3457+
output:
3458+
result:
3459+
class: Directory
3460+
basename: A:Gln2Cys_result
3461+
listing:
3462+
- basename: hello.txt
3463+
checksum: sha1$47a013e660d408619d894b20806b1d5086aab03b
3464+
class: File
3465+
size: 13
3466+
job: tests/colon_test_output_job.yaml
3467+
tool: tests/colon_test_output.cwl
3468+
doc: Confirm that colons are tolerated in output directory names
3469+
tags: [ required, command_line_tool ]

tests/A:Gln2Cys

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Example gene file

tests/colon:test.cwl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.2
4+
hints:
5+
DockerRequirement:
6+
dockerPull: docker.io/bash:4.4
7+
inputs:
8+
input_file: File
9+
outdir_name: string
10+
11+
baseCommand: [ bash, -c ]
12+
stdout: re:sult
13+
arguments:
14+
- |
15+
mkdir $(inputs.outdir_name);
16+
cp $(inputs.input_file.path) $(inputs.outdir_name)/;
17+
echo Status: done!
18+
outputs:
19+
log: stdout
20+
result:
21+
type: Directory
22+
outputBinding:
23+
glob: $(inputs.outdir_name)

tests/colon:test:job.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
input_file:
2+
class: File
3+
location: A%3AGln2Cys # location is a URI, even if it is relative,
4+
# so it needs URI encoding
5+
# (also known as percent escaping)
6+
outdir_name: A:Gln2Cys_result

tests/colon_test_output.cwl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.2
4+
hints:
5+
DockerRequirement:
6+
dockerPull: docker.io/bash:4.4
7+
inputs:
8+
input_file: File
9+
outdir_name: string
10+
11+
baseCommand: [ bash, -c ]
12+
arguments:
13+
- |
14+
mkdir $(inputs.outdir_name);
15+
cp $(inputs.input_file.path) $(inputs.outdir_name)/;
16+
outputs:
17+
result:
18+
type: Directory
19+
outputBinding:
20+
glob: $(inputs.outdir_name)

tests/colon_test_output_job.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
input_file:
2+
class: File
3+
path: hello.txt
4+
outdir_name: A:Gln2Cys_result

0 commit comments

Comments
 (0)