summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
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
commitc64227e9492ddb5773cc6a890db9775aef7a1d3c (patch)
treea28b030469229d6ee23ff09664dfa12bca35c88f /test/ruby/test_rubyoptions.rb
parentb2af80f5d548083925c92407bab4ac17e94443f5 (diff)
downloadruby-c64227e9492ddb5773cc6a890db9775aef7a1d3c.tar.gz
ruby-c64227e9492ddb5773cc6a890db9775aef7a1d3c.tar.xz
ruby-c64227e9492ddb5773cc6a890db9775aef7a1d3c.zip
* 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
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 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