From 4dfd3739055388f0395eee81b3297966498f49d5 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 8 May 2013 04:07:21 +0000 Subject: test_scanner_events.rb: assert_location * test/ripper/test_scanner_events.rb (TestRipper#assert_location): rename so skipped in backtraces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ripper/test_scanner_events.rb | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'test/ripper') diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb index 7186df3971..66ae07cc6b 100644 --- a/test/ripper/test_scanner_events.rb +++ b/test/ripper/test_scanner_events.rb @@ -90,28 +90,28 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase 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" - end - - def validate_location(src) + 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 assert_location(src) buf = '' Ripper.lex(src).each do |pos, type, tok| line, col = *pos -- cgit v1.2.3