mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_ast.rb: Add test cases of heredoc columns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc1c6552b7
commit
43cc8ad924
1 changed files with 12 additions and 0 deletions
|
@ -138,4 +138,16 @@ class TestAst < Test::Unit::TestCase
|
|||
assert_equal("NODE_STR", node.type)
|
||||
assert_equal(0, node.first_column)
|
||||
end
|
||||
|
||||
def test_column_of_heredoc
|
||||
node = RubyVM::AST.parse("<<-SRC\nddddddd\nSRC\n").children[1]
|
||||
assert_equal("NODE_STR", node.type)
|
||||
assert_equal(0, node.first_column)
|
||||
assert_equal(6, node.last_column)
|
||||
|
||||
node = RubyVM::AST.parse("<<SRC\nddddddd\nSRC\n").children[1]
|
||||
assert_equal("NODE_STR", node.type)
|
||||
assert_equal(0, node.first_column)
|
||||
assert_equal(5, node.last_column)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue