From c64227e9492ddb5773cc6a890db9775aef7a1d3c Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 14 Oct 2009 04:24:16 +0000 Subject: * ruby.c (process_options): script name should not be shown in an error message before loaded. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 87d2200ad..4e78b4c82 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -311,4 +311,13 @@ class TestRubyOptions < Test::Unit::TestCase ensure t.close(true) if t end + + def test_notfound + notexist = "./notexist.rb" + rubybin = Regexp.quote(EnvUtil.rubybin) + pat = /\A#{rubybin}:.* -- #{Regexp.quote(notexist)} \(LoadError\)\Z/ + assert_equal(false, File.exist?(notexist)) + assert_in_out_err(["-r", notexist, "-ep"], [], [], pat) + assert_in_out_err([notexist], [], [], pat) + end end -- cgit