mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
fe01a3434d
commit
0e4121aa5b
3 changed files with 16 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue