Last Windows NT portability fixes (this release).
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 14 Dec 2001 01:42:15 +0000 (01:42 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 14 Dec 2001 01:42:15 +0000 (01:42 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@152 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/BuilderTests.py
src/engine/SCons/Node/FSTests.py
src/engine/SCons/UtilTests.py

index 575cb7755879f5c6392cc87704a4f5b3cefe3fd8..6590daf2127ab49b43af4598b15563e6fcda80ef 100644 (file)
@@ -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
index 523f96b9afcaffc5df9d14ad25298525eaf3b3f3..45f8e643c57abe9bad56c299a09192a8ee672f8b 100644 (file)
@@ -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()
 
index adcd58628b6ce96673345fe37ff0a9a562cebbc8..2952fc43ddf5b29290f4303d45c3dc35bf769c52 100644 (file)
@@ -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]