diff options
| author | Steven Knight <knight@baldmt.com> | 2001-12-14 01:42:15 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2001-12-14 01:42:15 (GMT) |
| commit | 5cc3042f69d0a5fb233818349cd7528811c08964 (patch) | |
| tree | 36c1682592109e317a4ea0ee211cc858c710b44b /src/engine | |
| parent | 30f27e3b208369e6258f02e9d4519a5bdf82d6bd (diff) | |
| download | SCons-5cc3042f69d0a5fb233818349cd7528811c08964.zip SCons-5cc3042f69d0a5fb233818349cd7528811c08964.tar.gz SCons-5cc3042f69d0a5fb233818349cd7528811c08964.tar.bz2 | |
Last Windows NT portability fixes (this release).
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/SCons/BuilderTests.py | 8 | ||||
| -rw-r--r-- | src/engine/SCons/Node/FSTests.py | 3 | ||||
| -rw-r--r-- | src/engine/SCons/UtilTests.py | 8 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 575cb77..6590daf 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -30,6 +30,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" def Func(): pass +import os.path import sys import unittest @@ -281,13 +282,13 @@ class BuilderTestCase(unittest.TestCase): 'LIBLINKSUFFIX' : '', 'LIBPATH' : ['lib'], 'LIBDIRPREFIX' : '-L', - 'LIBDIRSUFFIX' : '/', + 'LIBDIRSUFFIX' : 'X', 'CPPPATH' : ['c', 'p'], 'INCPREFIX' : '-I', 'INCSUFFIX' : ''} contents = apply(b4.get_contents, (), kw) - assert contents == "-ll1 -ll2 -Llib/ -Ic -Ip", contents + assert contents == "-ll1 -ll2 -LlibX -Ic -Ip", contents # SCons.Node.FS has been imported by our import of # SCons.Node.Builder. It's kind of bogus that we don't @@ -296,7 +297,8 @@ class BuilderTestCase(unittest.TestCase): # to the other module via a direct import. kw['dir'] = SCons.Node.FS.default_fs.Dir('d') contents = apply(b4.get_contents, (), kw) - assert contents == "-ld/l1 -ld/l2 -Ld/lib/ -Id/c -Id/p", contents + expect = os.path.normpath("-ld/l1 -ld/l2 -Ld/libX -Id/c -Id/p") + assert contents == expect, contents + " != " + expect def test_name(self): """Test Builder creation with a specified name diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 523f96b..45f8e64 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -24,6 +24,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os +import os.path import string import sys import unittest @@ -367,7 +368,7 @@ class FSTestCase(unittest.TestCase): val[d] = 'd' val[e] = 'e' for k, v in val.items(): - assert k == "hash/" + v + assert k == os.path.normpath("hash/" + v) #XXX test exists() diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py index adcd586..2952fc4 100644 --- a/src/engine/SCons/UtilTests.py +++ b/src/engine/SCons/UtilTests.py @@ -167,7 +167,7 @@ class UtilTestCase(unittest.TestCase): fs = SCons.Node.FS.FS(test.workpath("")) node_derived = fs.File(test.workpath('./bar/baz')) node_derived.builder_set(1) # Any non-zero value. - paths = map(lambda x, fs=fs: fs.Dir(x), ['./', './bar']) + paths = map(lambda x, fs=fs: fs.Dir(x), ['.', './bar']) nodes = find_files(['foo', 'baz'], paths, fs.File) file_names = map(str, nodes) file_names = map(os.path.normpath, file_names) @@ -193,11 +193,11 @@ class UtilTestCase(unittest.TestCase): 'INCSUFFIX' : 'bar'} autogenerate(dict, dir = SCons.Node.FS.default_fs.Dir('/xx')) assert len(dict['_INCFLAGS']) == 3, dict('_INCFLAGS') - assert dict['_INCFLAGS'][0] == 'foo/xx/foobar', \ + assert dict['_INCFLAGS'][0] == os.path.normpath('foo/xx/foobar'), \ dict['_INCFLAGS'][0] - assert dict['_INCFLAGS'][1] == 'foo/xx/barbar', \ + assert dict['_INCFLAGS'][1] == os.path.normpath('foo/xx/barbar'), \ dict['_INCFLAGS'][1] - assert dict['_INCFLAGS'][2] == 'foo/xx/bazbar', \ + assert dict['_INCFLAGS'][2] == os.path.normpath('foo/xx/bazbar'), \ dict['_INCFLAGS'][2] |
