[前][次][番号順一覧][スレッド一覧]

ruby-changes:19045

From: usa <ko1@a...>
Date: Thu, 10 Mar 2011 10:55:36 +0900 (JST)
Subject: [ruby-changes:19045] Ruby:r31083 (trunk): * test/ruby/test_require.rb: setting too long string to ENV causes

usa	2011-03-10 10:55:30 +0900 (Thu, 10 Mar 2011)

  New Revision: 31083

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31083

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_require.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31082)
+++ ChangeLog	(revision 31083)
@@ -1,3 +1,9 @@
+Thu Mar 10 10:52:01 2011  NAKAMURA Usaku  <usa@r...>
+
+	* 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.
+
 Thu Mar 10 10:09:35 2011  NARUSE, Yui  <naruse@r...>
 
 	* lib/test/unit.rb (Test::Unit::Runner::Worker#read): fix for the case
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 31082)
+++ test/ruby/test_require.rb	(revision 31083)
@@ -29,7 +29,7 @@
     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 @@
     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 @@
     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)
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]