1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ripper/test_sexp.rb
nobu d1ec43ae7a parse.y: Ripper.sexp returns error
* ext/ripper/lib/ripper/sexp.rb (Ripper.sexp, Ripper.sexp_raw):
  return nil on error.  [ruby-dev:48678] [Bug #10405]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-26 03:24:18 +00:00

18 lines
409 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")
end
end if ripper_test