diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-06-16 23:58:19 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-06-19 02:24:14 +0000 |
commit | e7440dcaeae68de421356e22c9126b4325ad7bff (patch) | |
tree | 3464f914d1fa46deb5e0c4373c9c1b9e4d977e00 | |
parent | 10e4a9a5c271366a426056566edbdef3f4311c9d (diff) |
[rubygems/rubygems] RemoteFetcher tests don't work with path including `+`
https://github.com/rubygems/rubygems/commit/657d57621e
-rw-r--r-- | test/rubygems/test_gem_remote_fetcher.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index 47633175f6..72df720825 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -311,6 +311,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== end def test_download_local + omit "doesn't work if tempdir has +" if @tempdir.include?("+") FileUtils.mv @a1_gem, @tempdir local_path = File.join @tempdir, @a1.file_name inst = nil @@ -323,6 +324,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== end def test_download_local_space + omit "doesn't work if tempdir has +" if @tempdir.include?("+") space_path = File.join @tempdir, "space path" FileUtils.mkdir space_path FileUtils.mv @a1_gem, space_path @@ -356,6 +358,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== unless Gem.win_platform? || Process.uid.zero? # File.chmod doesn't work def test_download_local_read_only + omit "doesn't work if tempdir has +" if @tempdir.include?("+") FileUtils.mv @a1_gem, @tempdir local_path = File.join @tempdir, @a1.file_name inst = nil @@ -374,8 +377,10 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== assert_equal(File.join(@tempdir, @a1.file_name), inst.download(@a1, local_path)) ensure - FileUtils.chmod 0o755, File.join(Gem.user_dir, "cache") - FileUtils.chmod 0o755, @a1.cache_dir + if local_path + FileUtils.chmod 0o755, File.join(Gem.user_dir, "cache") + FileUtils.chmod 0o755, @a1.cache_dir + end end def test_download_read_only @@ -418,6 +423,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg== end def test_download_same_file + omit "doesn't work if tempdir has +" if @tempdir.include?("+") FileUtils.mv @a1_gem, @tempdir local_path = File.join @tempdir, @a1.file_name inst = nil |