mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_rubyoptions.rb: better approach.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b644ad43d
commit
2967707b32
1 changed files with 3 additions and 2 deletions
|
@ -409,12 +409,13 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
|
||||
def test_notfound
|
||||
notexist = "./notexist.rb"
|
||||
rubybin = Regexp.quote(EnvUtil.rubybin)
|
||||
rubybin = EnvUtil.rubybin.dup
|
||||
rubybin.gsub!(%r(/), '\\') if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
rubybin = Regexp.quote(rubybin)
|
||||
pat = Regexp.quote(notexist)
|
||||
bug1573 = '[ruby-core:23717]'
|
||||
assert_file.not_exist?(notexist)
|
||||
assert_in_out_err(["-r", notexist, "-ep"], "", [], /.* -- #{pat} \(LoadError\)/, bug1573)
|
||||
rubybin.gsub!(%r(/), '\\\\') if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_in_out_err([notexist], "", [], /#{rubybin}:.* -- #{pat} \(LoadError\)/, bug1573)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue