Skip to content

Commit

Permalink
Add tests for file and directory literals in output as produced by ex…
Browse files Browse the repository at this point in the history
…pression tool.
  • Loading branch information
Peter Amstutz committed Nov 8, 2016
1 parent ee3bb1c commit d8b6c8f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
36 changes: 35 additions & 1 deletion v1.0/conformance_test_v1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -925,4 +925,38 @@
}
}
tool: v1.0/docker-array-secondaryfiles.cwl
doc: Test secondaryFiles on array of files.
doc: Test secondaryFiles on array of files.

- job: v1.0/dir7.yml
output: {
"dir": {
"location": "a_directory",
"class": "Directory",
"listing": [
{
"class": "File",
"location": "whale.txt",
"checksum": "sha1$327fc7aedf4f6b69a42a7c8b808dc5a7aff61376",
"size": 1111
},
{
"class": "File",
"location": "hello.txt",
"checksum": "sha1$47a013e660d408619d894b20806b1d5086aab03b",
"size": 13
}
]
}
}
tool: v1.0/dir7.cwl
doc: Test directory literal output created by ExpressionTool

- job: v1.0/empty.json
output:
lit:
location: "a_file"
class: "File"
checksum: "sha1$fea23663b9c8ed71968f86415b5ec091bb111448"
size: 19
tool: v1.0/file-literal-ex.cwl
doc: Test file literal output created by ExpressionTool
12 changes: 12 additions & 0 deletions v1.0/v1.0/dir7.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class: ExpressionTool
cwlVersion: v1.0
requirements:
InlineJavascriptRequirement: {}
inputs:
files: File[]
outputs:
dir: Directory
expression: |
${
return {"dir": {"class": "Directory", "basename": "a_directory", "listing": inputs.files}};
}
5 changes: 5 additions & 0 deletions v1.0/v1.0/dir7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
files:
- class: File
location: hello.txt
- class: File
location: whale.txt
11 changes: 11 additions & 0 deletions v1.0/v1.0/file-literal-ex.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class: ExpressionTool
cwlVersion: v1.0
requirements:
InlineJavascriptRequirement: {}
inputs: []
outputs:
lit: File
expression: |
${
return {"lit": {"class": "File", "basename": "a_file", "contents": "Hello file literal."}};
}

0 comments on commit d8b6c8f

Please sign in to comment.