From d504a2458c14d25dee796a1e59b8c83bf8f3e186 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 8 Mar 2011 06:59:51 +0000 Subject: [PATCH] * test/rubygems/test_gem_spec_fetcher.rb (TestGemSpecFetcher#test_cache_dir_escapes_windows_paths): cache_dir may have driveletter and `:' for base of cache_dir itself, so need to skip it for checking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ test/rubygems/test_gem_spec_fetcher.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f2b7a6de2b..44eec7aa32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Mar 8 15:57:20 2011 NAKAMURA Usaku + + * test/rubygems/test_gem_spec_fetcher.rb + (TestGemSpecFetcher#test_cache_dir_escapes_windows_paths): cache_dir + may have driveletter and `:' for base of cache_dir itself, so need + to skip it for checking. + Tue Mar 8 12:30:06 2011 Nobuyoshi Nakada * misc/ruby-mode.el (ruby-deep-indent-paren-p, ruby-calculate-indent): diff --git a/test/rubygems/test_gem_spec_fetcher.rb b/test/rubygems/test_gem_spec_fetcher.rb index 57983a2752..20a40b68c1 100644 --- a/test/rubygems/test_gem_spec_fetcher.rb +++ b/test/rubygems/test_gem_spec_fetcher.rb @@ -415,7 +415,8 @@ class TestGemSpecFetcher < Gem::TestCase def test_cache_dir_escapes_windows_paths uri = URI.parse("file:///C:/WINDOWS/Temp/gem_repo") cache_dir = @sf.cache_dir(uri) - assert cache_dir !~ /:/, "#{cache_dir} should not contain a :" + pos = (/\A[a-z]:/i =~ cache_dir) ? 2 : 0 + refute /:/ =~ cache_dir[pos..-1], "#{cache_dir} should not contain a :" end end