aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/prism/fixtures/heredoc_with_comment.txt2
-rw-r--r--test/prism/snapshots/heredoc_with_comment_at_start.txt11
2 files changed, 13 insertions, 0 deletions
diff --git a/test/prism/fixtures/heredoc_with_comment.txt b/test/prism/fixtures/heredoc_with_comment.txt
new file mode 100644
index 0000000000..cf48c12051
--- /dev/null
+++ b/test/prism/fixtures/heredoc_with_comment.txt
@@ -0,0 +1,2 @@
+<<-TARGET # comment
+TARGET \ No newline at end of file
diff --git a/test/prism/snapshots/heredoc_with_comment_at_start.txt b/test/prism/snapshots/heredoc_with_comment_at_start.txt
new file mode 100644
index 0000000000..d9dfa8541e
--- /dev/null
+++ b/test/prism/snapshots/heredoc_with_comment_at_start.txt
@@ -0,0 +1,11 @@
+@ ProgramNode (location: (1,0)-(1,9))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(1,9))
+ └── body: (length: 1)
+ └── @ StringNode (location: (1,0)-(1,9))
+ ├── flags: ∅
+ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET"
+ ├── content_loc: (2,0)-(3,0) = " data\r\n"
+ ├── closing_loc: (3,0)-(4,0) = "TARGET\r\n"
+ └── unescaped: " data\r\n"