def Func():
pass
+import os.path
import sys
import unittest
'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
# 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
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)
'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]