mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):
split from test_require_path_home. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aea93cbed8
commit
29422e5d31
2 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jan 28 16:04:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):
|
||||||
|
split from test_require_path_home.
|
||||||
|
|
||||||
Fri Jan 28 13:04:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Fri Jan 28 13:04:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* configure.in (--with-valgrind): Fixed r29683. Now this option
|
* configure.in (--with-valgrind): Fixed r29683. Now this option
|
||||||
|
|
|
@ -46,7 +46,7 @@ class TestRequire < Test::Unit::TestCase
|
||||||
assert_match(/\u{221e}\z/, e.message, bug3758)
|
assert_match(/\u{221e}\z/, e.message, bug3758)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_require_path_home
|
def test_require_path_home_1
|
||||||
env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
|
env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
|
||||||
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
|
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
|
||||||
|
|
||||||
|
@ -54,10 +54,28 @@ class TestRequire < Test::Unit::TestCase
|
||||||
ENV["HOME"] = "/foo" * 2500
|
ENV["HOME"] = "/foo" * 2500
|
||||||
assert_in_out_err(%w(-S test_ruby_test_require), "", [], pathname_too_long)
|
assert_in_out_err(%w(-S test_ruby_test_require), "", [], pathname_too_long)
|
||||||
|
|
||||||
|
ensure
|
||||||
|
env_rubypath ? ENV["RUBYPATH"] = env_rubypath : ENV.delete("RUBYPATH")
|
||||||
|
env_home ? ENV["HOME"] = env_home : ENV.delete("HOME")
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_require_path_home_2
|
||||||
|
env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
|
||||||
|
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
|
||||||
|
|
||||||
ENV["RUBYPATH"] = "~" + "/foo" * 2500
|
ENV["RUBYPATH"] = "~" + "/foo" * 2500
|
||||||
ENV["HOME"] = "/foo"
|
ENV["HOME"] = "/foo"
|
||||||
assert_in_out_err(%w(-S test_ruby_test_require), "", [], pathname_too_long)
|
assert_in_out_err(%w(-S test_ruby_test_require), "", [], pathname_too_long)
|
||||||
|
|
||||||
|
ensure
|
||||||
|
env_rubypath ? ENV["RUBYPATH"] = env_rubypath : ENV.delete("RUBYPATH")
|
||||||
|
env_home ? ENV["HOME"] = env_home : ENV.delete("HOME")
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_require_path_home_3
|
||||||
|
env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
|
||||||
|
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
|
||||||
|
|
||||||
t = Tempfile.new(["test_ruby_test_require", ".rb"])
|
t = Tempfile.new(["test_ruby_test_require", ".rb"])
|
||||||
t.puts "p :ok"
|
t.puts "p :ok"
|
||||||
t.close
|
t.close
|
||||||
|
|
Loading…
Add table
Reference in a new issue