summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-20 05:40:23 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-20 05:40:23 +0000
commit144339d4bce9a8e91d44ee9942dc31d7fd27c239 (patch)
treec3ea3b92d704c3b0be7514c84fec0c032eeb8198 /test/ripper
parent9f18c235727fc3875b4423bd1ad7eba69f9520e9 (diff)
* parse.y [ripper]: adjust lineno and columns for multi-line strings.
* parse.y [ripper]: delay heredocument events until seeing end-of-line. * parse.y [ripper]: event on__heredoc_contentn -> on__tstring_content. * ext/ripper/eventids2.c: ditto. * ext/ripper/lib/ripper.rb: sync with eventids2.c. * test/ripper/test_scanner_events.rb: test it. * ext/ripper/tools/generate-ripper_rb.rb: show basename of input. * ext/ripper/Makefile.dev: support objdir build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_scanner_events.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index a4dd37bad7..6b95c4f5dd 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -573,19 +573,21 @@ class TestRipper_ScannerEvents < Test::Unit::TestCase
R.scan('heredoc_beg', "<<'EOS'\nheredoc\nEOS")
assert_equal [%q(<<`EOS`)],
R.scan('heredoc_beg', "<<`EOS`\nheredoc\nEOS")
+ assert_equal [%q(<<" ")],
+ R.scan('heredoc_beg', %Q[<<" "\nheredoc\nEOS])
end
- def test_heredoc_content
+ def test_tstring_content_HEREDOC
assert_equal [],
- R.scan('heredoc_content', '')
+ R.scan('tstring_content', '')
assert_equal ["heredoc\n"],
- R.scan('heredoc_content', "<<EOS\nheredoc\nEOS")
+ R.scan('tstring_content', "<<EOS\nheredoc\nEOS")
assert_equal ["heredoc\n"],
- R.scan('heredoc_content', "<<EOS\nheredoc\nEOS\n")
+ R.scan('tstring_content', "<<EOS\nheredoc\nEOS\n")
assert_equal ["heredoc \n"],
- R.scan('heredoc_content', "<<EOS\nheredoc \nEOS \n")
+ R.scan('tstring_content', "<<EOS\nheredoc \nEOS \n")
assert_equal ["heredoc\n"],
- R.scan('heredoc_content', "<<-EOS\nheredoc\n\tEOS \n")
+ R.scan('tstring_content', "<<-EOS\nheredoc\n\tEOS \n")
end
def test_heredoc_end