From e7440dcaeae68de421356e22c9126b4325ad7bff Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 16 Jun 2023 23:58:19 +0900 Subject: [rubygems/rubygems] RemoteFetcher tests don't work with path including `+` https://github.com/rubygems/rubygems/commit/657d57621e --- test/rubygems/test_gem_remote_fetcher.rb | 10 ++++++++-- 1 file 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 -- cgit v1.2.3