1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2011-03-08 06:59:51 +00:00
parent 85df40e9ab
commit d504a2458c
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,10 @@
Tue Mar 8 15:57:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* 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 <nobu@ruby-lang.org>
* misc/ruby-mode.el (ruby-deep-indent-paren-p, ruby-calculate-indent):

View file

@ -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