From 201267b1c555a33adeb03d41d8748cb40562c0a8 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Thu, 16 Sep 2010 06:03:13 +0000 Subject: [PATCH] * test/ruby/test_file_exhaustive.rb (TestFileExhaustive::test_expand_path): ENV["HOME"] might not be set. On those cases without it an exception raises here, which effectively disables later tests on this method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ test/ruby/test_file_exhaustive.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99401d28e2..2bb5cd5ec3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Sep 16 14:50:42 2010 URABE Shyouhei + + * test/ruby/test_file_exhaustive.rb (TestFileExhaustive::test_expand_path): + ENV["HOME"] might not be set. On those cases without it an + exception raises here, which effectively disables later + tests on this method. + Thu Sep 16 08:30:28 2010 Nobuyoshi Nakada * sprintf.c (rb_f_sprintf): fix rdoc. pointed out by Tomoyuki diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 5a62db1124..1d45b97d9f 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -398,7 +398,7 @@ class TestFileExhaustive < Test::Unit::TestCase assert_equal(@file, File.expand_path(@file + "::$DATA")) assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]') end - assert_kind_of(String, File.expand_path("~")) + assert_kind_of(String, File.expand_path("~")) if ENV["HOME"] assert_raise(ArgumentError) { File.expand_path("~foo_bar_baz_unknown_user_wahaha") } assert_raise(ArgumentError) { File.expand_path("~foo_bar_baz_unknown_user_wahaha", "/") } begin