summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-08 04:07:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-08 04:07:21 +0000
commit4dfd3739055388f0395eee81b3297966498f49d5 (patch)
treef14bb85e4865c1c7337bc28de3dd8e0a2bfff986 /test
parentb8bcd920591a1398d68517dc121362302ea9e77a (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ripper/test_scanner_events.rb44
1 files changed, 22 insertions, 22 deletions
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