ruby-changes:28554
From: nobu <ko1@a...>
Date: Wed, 8 May 2013 13:07:30 +0900 (JST)
Subject: [ruby-changes:28554] nobu:r40606 (trunk): test_scanner_events.rb: assert_location
nobu 2013-05-08 13:07:21 +0900 (Wed, 08 May 2013) New Revision: 40606 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40606 Log: test_scanner_events.rb: assert_location * test/ripper/test_scanner_events.rb (TestRipper#assert_location): rename so skipped in backtraces. Modified files: trunk/test/ripper/test_scanner_events.rb Index: test/ripper/test_scanner_events.rb =================================================================== --- test/ripper/test_scanner_events.rb (revision 40605) +++ test/ripper/test_scanner_events.rb (revision 40606) @@ -90,28 +90,28 @@ class TestRipper::ScannerEvents < Test:: https://github.com/ruby/ruby/blob/trunk/test/ripper/test_scanner_events.rb#L90 end def test_location - validate_location "" - validate_location " " - validate_location "@" - validate_location "\n" - validate_location "\r\n" - validate_location "\n\n\n\n\n\r\n\n\n" - validate_location "\n;\n;\n;\n;\n" - validate_location "nil" - validate_location "@ivar" - validate_location "1;2;3" - validate_location "1\n2\n3" - validate_location "1\n2\n3\n" - validate_location "def m(a) nil end" - validate_location "if true then false else nil end" - validate_location "BEGIN{print nil}" - validate_location "%w(a b\nc\r\nd \ne )" - validate_location %Q["a\nb\r\nc"] - validate_location "print(<<""EOS)\nheredoc\nEOS\n" - validate_location "print(<<-\"EOS\")\nheredoc\n EOS\n" + assert_location "" + assert_location " " + assert_location "@" + assert_location "\n" + assert_location "\r\n" + assert_location "\n\n\n\n\n\r\n\n\n" + assert_location "\n;\n;\n;\n;\n" + assert_location "nil" + assert_location "@ivar" + assert_location "1;2;3" + assert_location "1\n2\n3" + assert_location "1\n2\n3\n" + assert_location "def m(a) nil end" + assert_location "if true then false else nil end" + assert_location "BEGIN{print nil}" + assert_location "%w(a b\nc\r\nd \ne )" + assert_location %Q["a\nb\r\nc"] + assert_location "print(<<""EOS)\nheredoc\nEOS\n" + assert_location "print(<<-\"EOS\")\nheredoc\n EOS\n" end - def validate_location(src) + def assert_location(src) buf = '' Ripper.lex(src).each do |pos, type, tok| line, col = *pos -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/