http://scons.tigris.org/svn/scons/branches/core
........
r2722 | stevenknight | 2008-03-31 11:51:25 -0700 (Mon, 31 Mar 2008) | 2 lines
Update the copyright year.
........
r2723 | stevenknight | 2008-03-31 11:56:25 -0700 (Mon, 31 Mar 2008) | 2 lines
Windows portability fixes in tests (mostly with absolute path handling).
........
r2724 | stevenknight | 2008-03-31 12:44:37 -0700 (Mon, 31 Mar 2008) | 2 lines
Update publication month (way out of date).
........
git-svn-id: http://scons.tigris.org/svn/scons/trunk@2725
fdb21ef1-2011-0410-befe-
b5e4ea1792b1
# When this gets changed, you also need to change test/option-v.py
# so it looks for the right string.
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'January 2007'
+month_year = 'March 2008'
#
# __COPYRIGHT__
def test_parse_flags(self):
'''Test the Base class parse_flags argument'''
# all we have to show is that it gets to MergeFlags internally
- env = Environment(parse_flags = '-X')
+ env = Environment(tools=[], parse_flags = '-X')
assert env['CCFLAGS'] == ['-X'], env['CCFLAGS']
- env = Environment(CCFLAGS=None, parse_flags = '-Y')
+ env = Environment(tools=[], CCFLAGS=None, parse_flags = '-Y')
assert env['CCFLAGS'] == ['-Y'], env['CCFLAGS']
- env = Environment(CPPDEFINES = 'FOO', parse_flags = '-std=c99 -X -DBAR')
+ env = Environment(tools=[], CPPDEFINES = 'FOO', parse_flags = '-std=c99 -X -DBAR')
assert env['CFLAGS'] == ['-std=c99'], env['CFLAGS']
assert env['CCFLAGS'] == ['-X'], env['CCFLAGS']
assert env['CPPDEFINES'] == ['FOO', 'BAR'], env['CPPDEFINES']
test.subdir('install', 'subdir')
install = test.workpath('install')
+install_f1_out = os.path.join('install', 'f1.out')
install_file1_out = test.workpath('install', 'file1.out')
install_file2_out = test.workpath('install', 'file2.out')
install_file3_out = test.workpath('install', 'file3.out')
subdir_file3_in = os.path.join('subdir', 'file3.in')
expect = test.wrap_stdout("""\
-Install file: "file1.in" as "install/f1.out"
+Install file: "file1.in" as "%(install_f1_out)s"
Install file: "file1.in" as "%(install_file1_out)s"
Install file: "file2.in" as "%(install_file2_out)s"
Install file: "%(subdir_file3_in)s" as "%(install_file3_out)s"
target_file2_out = os.path.join(target, 'file2.out')
subdir_file3_in = os.path.join('subdir', 'file3.in')
target_subdir_file3_out = os.path.join(target, 'subdir', 'file3.out')
-file1_out = target+os.path.join( target, destdir, 'file1.out' )
+file1_out = target+os.path.join( target,
+ os.path.splitdrive(destdir)[1],
+ 'file1.out' )
#
test.write('SConstruct', r"""
environment.
"""
+import os.path
+
import TestSCons
test = TestSCons.TestSCons()
test.subdir('outside', 'sub')
test.write('SConstruct', """\
+import os.path
+
def cat(env, source, target):
target = str(target[0])
source = map(str, source)
env.SconsInternalInstallAsFunc = env.InstallAs
def InstallWithDestDir(dir, source):
- return env.SconsInternalInstallFunc('$DESTDIR'+env.Dir(dir).abspath, source)
+ abspath = os.path.splitdrive(env.Dir(dir).abspath)[1]
+ return env.SconsInternalInstallFunc('$DESTDIR'+abspath, source)
def InstallAsWithDestDir(target, source):
- return env.SconsInternalInstallAsFunc('$DESTDIR'+env.File(target).abspath, source)
+ abspath = os.path.splitdrive(env.File(target).abspath)[1]
+ return env.SconsInternalInstallAsFunc('$DESTDIR'+abspath, source)
# Add the wrappers directly as attributes.
env.Install = InstallWithDestDir
test.run(arguments = '.')
-f1_out = test.workpath('dest') + test.workpath('export', 'f1.out')
-f2_new_out = test.workpath('dest') + test.workpath('export', 'f2-new.out')
-f3_out = test.workpath('dest') + test.workpath('export', 'f3.out')
-f4_new_out = test.workpath('dest') + test.workpath('export', 'f4-new.out')
+export = os.path.splitdrive(test.workpath('export'))[1]
+
+f1_out = test.workpath('dest') + os.path.join(export, 'f1.out')
+f2_new_out = test.workpath('dest') + os.path.join(export, 'f2-new.out')
+f3_out = test.workpath('dest') + os.path.join(export, 'f3.out')
+f4_new_out = test.workpath('dest') + os.path.join(export, 'f4-new.out')
test.must_match(f1_out, "f1.in\n")
test.must_match(f2_new_out, "f2.in\n")
Test the ListOption canned Option type.
"""
+import os
import os.path
import string
check(['all', '1', 'gl ical qt x11', 'gl ical qt x11',
"['gl ical qt x11']"])
-test.must_match(test.workpath('scons.options'), "shared = 'all'\n")
+test.must_match(test.workpath('scons.options'), "shared = 'all'"+os.linesep)
check(['all', '1', 'gl ical qt x11', 'gl ical qt x11',
"['gl ical qt x11']"])
# by the packaging build.
copyright_marker = '__' + 'COPYRIGHT' + '__'
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008'
fmt = '(%s|Copyright \\(c\\) %s The SCons Foundation)\n'