Skip to content

Commit 4c8e630

Browse files
committed
Add test for plain text $include.
1 parent 3bdf9f2 commit 4c8e630

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

tests/cwl/misc/cl-include-text.cwl

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.0
4+
5+
requirements:
6+
InitialWorkDirRequirement:
7+
listing:
8+
- entryname: text1.txt
9+
entry:
10+
$include: text1.txt
11+
12+
inputs:
13+
one:
14+
type: string
15+
16+
outputs:
17+
output:
18+
type: stdout
19+
stdout: text1.out
20+
21+
baseCommand:
22+
- cat
23+
- text1.txt

tests/cwl/misc/text1.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
We hold these truths to be self-evident,
2+
that all men are created equal

tests/test_code_intelligence.py

+11
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ def test_remote_files():
116116
assert hov.contents.value == "```\n\n```"
117117

118118

119+
def test_plain_text_include():
120+
this_path = current_path / "cwl" / "misc" / "cl-include-text.cwl"
121+
doc = load(doc_path=this_path, type_dicts=type_dicts)
122+
123+
assert len(doc.problems) == 0
124+
125+
hov = doc.hover(Position(9, 21))
126+
assert "We hold" in hov.contents.value
127+
# Hover should show contents of included file
128+
129+
119130
def test_schemadef_import():
120131
this_path = current_path / "cwl" / "misc" / "cl-schemadef-import.cwl"
121132
doc = load(doc_path=this_path, type_dicts=type_dicts)

0 commit comments

Comments
 (0)