diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-05 00:48:12 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-05 00:48:12 +0000 |
commit | 6ac6ad5933cf4c44431677f2ffd0a8f5eb382405 (patch) | |
tree | f6f9633946b1c0ead6d96988ed4fde74ddf704f6 /test | |
parent | 9a0f100a314d0d6e3b1844c2e6a8ea07b8cd210d (diff) | |
download | ruby-6ac6ad5933cf4c44431677f2ffd0a8f5eb382405.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_ast.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 7a60811ec0..5a9bded19b 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -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 |