Skip to content

Commit e4be144

Browse files
committed
confirm enhanced TypeDSL from Schema Salad v1.3 doesn't leak through
1 parent f88d752 commit e4be144

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

tests/nested-array.cwl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cwlVersion: v1.2
2+
class: CommandLineTool
3+
baseCommand: echo
4+
inputs:
5+
letters:
6+
type: string[][]
7+
inputBinding:
8+
position: 1
9+
stdout: echo.txt
10+
outputs:
11+
echo: stdout

tests/test_examples.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,3 +1839,19 @@ def test_very_small_and_large_floats() -> None:
18391839
)
18401840
assert exit_code == 0, stderr
18411841
assert json.loads(stdout)["result"] == "0.00001 0.0000123 123000 1230000"
1842+
1843+
1844+
def test_invalid_nested_array() -> None:
1845+
"""Test feature proposed for CWL v1.3 in a CWL v1.2 document."""
1846+
exit_code, stdout, stderr = get_main_output(
1847+
[
1848+
"--validate",
1849+
get_data("tests/nested-array.cwl"),
1850+
]
1851+
)
1852+
assert exit_code == 1, stderr
1853+
stderr = re.sub(r"\s\s+", " ", stderr)
1854+
assert "Tool definition failed validation:" in stderr
1855+
assert (
1856+
"tests/nested-array.cwl:6:5: Field 'type' references unknown identifier 'string[][]'"
1857+
) in stderr

0 commit comments

Comments
 (0)