diff options
Diffstat (limited to 'test/ripper')
-rw-r--r-- | test/ripper/test_lexer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ripper/test_lexer.rb b/test/ripper/test_lexer.rb index 2a1c7881e4..48110857f8 100644 --- a/test/ripper/test_lexer.rb +++ b/test/ripper/test_lexer.rb @@ -90,4 +90,9 @@ class TestRipper::Lexer < Test::Unit::TestCase ] assert_equal expect, Ripper.lex(src).map {|e| e[1]} end + + def test_slice + assert_equal "string\#{nil}\n", + Ripper.slice(%(<<HERE\nstring\#{nil}\nHERE), "heredoc_beg .*? nl $(.*?) heredoc_end", 1) + end end |