Skip to content

Commit

Permalink
Add test for plain text $include.
Browse files Browse the repository at this point in the history
  • Loading branch information
kghose committed Sep 29, 2020
1 parent 3bdf9f2 commit 4c8e630
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/cwl/misc/cl-include-text.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0

requirements:
InitialWorkDirRequirement:
listing:
- entryname: text1.txt
entry:
$include: text1.txt

inputs:
one:
type: string

outputs:
output:
type: stdout
stdout: text1.out

baseCommand:
- cat
- text1.txt
2 changes: 2 additions & 0 deletions tests/cwl/misc/text1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
We hold these truths to be self-evident,
that all men are created equal
11 changes: 11 additions & 0 deletions tests/test_code_intelligence.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ def test_remote_files():
assert hov.contents.value == "```\n\n```"


def test_plain_text_include():
this_path = current_path / "cwl" / "misc" / "cl-include-text.cwl"
doc = load(doc_path=this_path, type_dicts=type_dicts)

assert len(doc.problems) == 0

hov = doc.hover(Position(9, 21))
assert "We hold" in hov.contents.value
# Hover should show contents of included file


def test_schemadef_import():
this_path = current_path / "cwl" / "misc" / "cl-schemadef-import.cwl"
doc = load(doc_path=this_path, type_dicts=type_dicts)
Expand Down

0 comments on commit 4c8e630

Please sign in to comment.