mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![nobu](/assets/img/avatar_default.png)
* parse.y (ripper_flush_string_content, parser_parse_string): preserve parsed string content. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
21 lines
510 B
Ruby
21 lines
510 B
Ruby
begin
|
|
require 'ripper'
|
|
require 'test/unit'
|
|
ripper_test = true
|
|
module TestRipper; end
|
|
rescue LoadError
|
|
end
|
|
|
|
class TestRipper::Sexp < Test::Unit::TestCase
|
|
def test_compile_error
|
|
assert_nil Ripper.sexp("/")
|
|
assert_nil Ripper.sexp("-")
|
|
assert_nil Ripper.sexp("+")
|
|
assert_nil Ripper.sexp("*")
|
|
assert_nil Ripper.sexp("end")
|
|
assert_nil Ripper.sexp("end 1")
|
|
assert_nil Ripper.sexp("/*")
|
|
assert_nil Ripper.sexp("/*/")
|
|
assert_nil Ripper.sexp("/+/")
|
|
end
|
|
end if ripper_test
|