Project

General

Profile

Bug #6804

test_generate_bin_bindir_with_user_install_warning(TestGemInstaller) fails on windows.

Added by os97673 (Oleg Sukhodolsky) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-07-27) [i386-mingw32]
[ruby-core:46823]

Description

The test fails on Windows with the following error:
--- expected
+++ actual
@@ -1 +1,3 @@
-""
+"WARNING: You don't have C:\Windows in your PATH,
+\t gem executables will not run.
+"

The problem is incorrect test in Gem::Installer.check_that_user_bin_dir_is_in_path()
It splits PATH by File::PATH_SEPARATOR and checks if the bin dir is included in this array.
But file system is case-insensitive on Windows (and may be case-insensitive on OS X too),
so it is incorrect way to compare these paths as string.
So, I suggest to compare them using File.identical? which should work correctly on any file system.

check_that_user_bin_dir_is_in_path.diff (757 Bytes) check_that_user_bin_dir_is_in_path.diff first version of the patch os97673 (Oleg Sukhodolsky), 07/28/2012 01:22 PM

History

#1 [ruby-core:46831] Updated by luislavena (Luis Lavena) over 5 years ago

  • Category set to test
  • Status changed from Open to Closed

Thank you Oleg,

This issue has already been fixed in upstream RubyGems and will be part of release 1.8.25 (not yet released)

Also available in: Atom PDF