From fd61c5508d40a7aab83935da26b41c8abe2ea815 Mon Sep 17 00:00:00 2001 From: aamine Date: Mon, 20 Sep 2004 05:40:23 +0000 Subject: * 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 --- test/ripper/test_scanner_events.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/ripper') 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', "<