aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-10 01:55:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-10 01:55:30 +0000
commita9a0b5dfee155428530ae37bebe8709a053b6f85 (patch)
treedf9529c1daa971dd0696fd1bcb6d5798e077506a /test
parent9e53a0b142f06540ee886ccf107299bdfc2ca3d6 (diff)
downloadruby-a9a0b5dfee155428530ae37bebe8709a053b6f85.tar.gz
* test/ruby/test_require.rb: setting too long string to ENV causes
Errno::EINVAL on Windows. long path name errors may causes over about 1024 bytes, then limit it about 4000 bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 14c26df39f..d19dddea0f 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -29,7 +29,7 @@ class TestRequire < Test::Unit::TestCase
INPUT
begin
- assert_in_out_err(["-S", "-w", "foo/" * 2500 + "foo"], "") do |r, e|
+ assert_in_out_err(["-S", "-w", "foo/" * 1000 + "foo"], "") do |r, e|
assert_equal([], r)
assert_operator(2, :<=, e.size)
assert_match(/warning: openpath: pathname too long \(ignored\)/, e.first)
@@ -51,7 +51,7 @@ class TestRequire < Test::Unit::TestCase
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
ENV["RUBYPATH"] = "~"
- ENV["HOME"] = "/foo" * 2500
+ ENV["HOME"] = "/foo" * 1000
assert_in_out_err(%w(-S -w test_ruby_test_require), "", [], pathname_too_long)
ensure
@@ -63,7 +63,7 @@ class TestRequire < Test::Unit::TestCase
env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
- ENV["RUBYPATH"] = "~" + "/foo" * 2500
+ ENV["RUBYPATH"] = "~" + "/foo" * 1000
ENV["HOME"] = "/foo"
assert_in_out_err(%w(-S -w test_ruby_test_require), "", [], pathname_too_long)