Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test for HeredocEnd
  • Loading branch information
wildmaples committed Jun 10, 2022
commit 0276c4458ef907d765eb05a7aaef4fa0a9448615
11 changes: 11 additions & 0 deletions test/node_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,17 @@ def test_heredoc_beg
assert_node(HeredocBeg, source, at: at, &:beginning)
end

def test_heredoc_end
source = <<~SOURCE
<<~HEREDOC
contents
HEREDOC
SOURCE

at = location(lines: 3..3, chars: 22..31, columns: 0..9)
assert_node(HeredocEnd, source, at: at, &:ending)
end

def test_hshptn
source = <<~SOURCE
case value
Expand Down