aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-14 04:24:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-14 04:24:16 +0000
commit0e4121aa5ba9875f3b2d3b130cc4f63a1f50fc26 (patch)
treea28b030469229d6ee23ff09664dfa12bca35c88f /test
parentfe01a3434da6ea3e3f2bf0bc0b0ad1447f12f4b8 (diff)
downloadruby-0e4121aa5ba9875f3b2d3b130cc4f63a1f50fc26.tar.gz
* ruby.c (process_options): script name should not be shown in an
error message before loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 87d2200ad2..4e78b4c827 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