diff options
author | Steven Knight <knight@baldmt.com> | 2006-02-25 17:40:21 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2006-02-25 17:40:21 (GMT) |
commit | 40bbc04d482ed19b5ae7593acb4b5afaa76520c3 (patch) | |
tree | 0ea74b3c80fe84e1eb5ee9bbd0245741a072da95 /src/engine/SCons/EnvironmentTests.py | |
parent | 39b08fdb0fb2eac589fdbbb93c2e45bf6d4d21d5 (diff) | |
download | SCons-40bbc04d482ed19b5ae7593acb4b5afaa76520c3.zip SCons-40bbc04d482ed19b5ae7593acb4b5afaa76520c3.tar.gz SCons-40bbc04d482ed19b5ae7593acb4b5afaa76520c3.tar.bz2 |
More Win32 portability fixes in EnvironmentTests.py. (Baptiste Lepilleur)
Diffstat (limited to 'src/engine/SCons/EnvironmentTests.py')
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 5600968..cc04451 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -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): |