diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-20 05:40:23 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-20 05:40:23 +0000 |
commit | fd61c5508d40a7aab83935da26b41c8abe2ea815 (patch) | |
tree | c3ea3b92d704c3b0be7514c84fec0c032eeb8198 /test/ripper | |
parent | 95872fd6c0b6bb65efa88c1458faf5a368b2be30 (diff) | |
download | ruby-fd61c5508d40a7aab83935da26b41c8abe2ea815.tar.gz ruby-fd61c5508d40a7aab83935da26b41c8abe2ea815.tar.xz ruby-fd61c5508d40a7aab83935da26b41c8abe2ea815.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@6931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r-- | test/ripper/test_scanner_events.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb index a4dd37bad..6b95c4f5d 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 |