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

ruby-changes:18677

From: kosaki <ko1@a...>
Date: Fri, 28 Jan 2011 16:07:04 +0900 (JST)
Subject: [ruby-changes:18677] Ruby:r30702 (trunk): * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):

kosaki	2011-01-28 16:06:48 +0900 (Fri, 28 Jan 2011)

  New Revision: 30702

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

  Log:
    * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):
      split from test_require_path_home.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30701)
+++ ChangeLog	(revision 30702)
@@ -1,3 +1,8 @@
+Fri Jan 28 16:04:54 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* configure.in (--with-valgrind): Fixed r29683. Now this option
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 30701)
+++ test/ruby/test_require.rb	(revision 30702)
@@ -46,7 +46,7 @@
     assert_match(/\u{221e}\z/, e.message, bug3758)
   end
 
-  def test_require_path_home
+  def test_require_path_home_1
     env_rubypath, env_home = ENV["RUBYPATH"], ENV["HOME"]
     pathname_too_long = /pathname too long \(ignored\).*\(LoadError\)/m
 
@@ -54,10 +54,28 @@
     ENV["HOME"] = "/foo" * 2500
     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["HOME"] = "/foo"
     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.puts "p :ok"
     t.close

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

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