More Win32 portability fixes in EnvironmentTests.py. (Baptiste Lepilleur)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 25 Feb 2006 17:40:21 +0000 (17:40 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 25 Feb 2006 17:40:21 +0000 (17:40 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1430 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/EnvironmentTests.py

index 56009685ff8e85228c4c6f3fabaa2513843c5437..cc04451d4aa07df8d0dfec260259f3fce9bf70f1 100644 (file)
@@ -819,7 +819,9 @@ class BaseTestCase(unittest.TestCase,TestEnvironmentFixture):
         def normalize_path(path, drive=drive):
             if path[0] in '\\/':
                 path = drive + path
-            return os.path.normpath(path)
+            path = os.path.normpath(path)
+            drive, path = os.path.splitdrive(path)
+            return string.lower(drive) + path
 
         env = dict.TestEnvironment(LIBS = [ 'foo', 'bar', 'baz' ],
                           LIBLINKPREFIX = 'foo',
@@ -892,6 +894,11 @@ class BaseTestCase(unittest.TestCase,TestEnvironmentFixture):
                    '-I', normalize_path('blatXXX'),
                    '$)'
         ]
+        def normalize_if_path(arg, np=normalize_path):
+            if arg not in ('$(','$)','-I'):
+                return np(str(arg))
+            return arg
+        flags = map(normalize_if_path, flags)
         assert flags == expect, flags
 
     def test_platform(self):