aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-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