test.fail_test(test.read(['normal', 'build', 'file.out']) != "normal/src/file.in\n")
# Verify the error when the BuildDir itself is read-only. Don't bother
-# to test this on Win32, because the ACL (I think) still allows the
+# to test this on Windows, because the ACL (I think) still allows the
# owner to create files in the directory even when it's read-only.
if sys.platform != 'win32':
dir = os.path.join('ro-dir', 'build')
os.environ['LD_LIBRARYN32_PATH'] = '.'
test.write('SConstruct', """
-foo = Environment(SHCCFLAGS = '%s', WIN32_INSERT_DEF=1)
-bar = Environment(SHCCFLAGS = '%s', WIN32_INSERT_DEF=1)
+foo = Environment(SHCCFLAGS = '%s', WINDOWS_INSERT_DEF=1)
+bar = Environment(SHCCFLAGS = '%s', WINDOWS_INSERT_DEF=1)
foo_obj = foo.SharedObject(target = 'foo', source = 'prog.c')
foo.SharedLibrary(target = 'foo', source = foo_obj)
test.run(program = test.workpath('barprog'), stdout = "prog.c: BAR\n")
test.write('SConstruct', """
-bar = Environment(SHCCFLAGS = '%s', WIN32_INSERT_DEF=1)
+bar = Environment(SHCCFLAGS = '%s', WINDOWS_INSERT_DEF=1)
foo_obj = bar.SharedObject(target = 'foo', source = 'prog.c')
bar.SharedLibrary(target = 'foo', source = foo_obj)
test = TestSCons.TestSCons()
test.write('SConstruct', """
-foo = Environment(SHCXXFLAGS = '%s', WIN32_INSERT_DEF=1)
-bar = Environment(SHCXXFLAGS = '%s', WIN32_INSERT_DEF=1)
+foo = Environment(SHCXXFLAGS = '%s', WINDOWS_INSERT_DEF=1)
+bar = Environment(SHCXXFLAGS = '%s', WINDOWS_INSERT_DEF=1)
foo.SharedObject(target = 'foo%s', source = 'prog.cpp')
bar.SharedObject(target = 'bar%s', source = 'prog.cpp')
foo.SharedLibrary(target = 'foo', source = 'foo%s')
test.run(program = test.workpath('barprog'), stdout = "prog.cpp: BAR\n")
test.write('SConstruct', """
-bar = Environment(SHCXXFLAGS = '%s', WIN32_INSERT_DEF=1)
+bar = Environment(SHCXXFLAGS = '%s', WINDOWS_INSERT_DEF=1)
bar.SharedObject(target = 'foo%s', source = 'prog.cpp')
bar.SharedObject(target = 'bar%s', source = 'prog.cpp')
bar.SharedLibrary(target = 'foo', source = 'foo%s')
test = TestSCons.TestSCons()
-# Note: Win32 basically has two modes that it can os.chmod() files to
+# Note: Windows basically has two modes that it can os.chmod() files to
# 0444 and 0666, and directories to 0555 and 0777, so we can only really
# oscillate between those values.
test.write('SConstruct', """
Import('env')
-local = env.Copy(WIN32_INSERT_DEF = 1)
+local = env.Copy(WINDOWS_INSERT_DEF = 1)
barsrc = [
'BarObject.cpp',
test.subdir('bld', 'src', ['src', 'subsrcdir'])
sconstruct = r"""
-foo = Environment(SHCXXFLAGS = '%(fooflags)s', WIN32_INSERT_DEF=1)
-bar = Environment(SHCXXFLAGS = '%(barflags)s', WIN32_INSERT_DEF=1)
+foo = Environment(SHCXXFLAGS = '%(fooflags)s', WINDOWS_INSERT_DEF=1)
+bar = Environment(SHCXXFLAGS = '%(barflags)s', WINDOWS_INSERT_DEF=1)
src = Dir('src')
BuildDir('bld', src, duplicate=1)
Nodes=[]
test = TestSCons.TestSCons()
if sys.platform != 'win32':
- test.skip_test('PharLap is only available on win32; skipping test.\n')
+ test.skip_test('PharLap is only available on Windows; skipping test.\n')
if not test.detect_tool('linkloc'):
test.skip_test("Could not find 'linkloc', skipping test.\n")
test.run(arguments='.')
-# Assume .exe extension...this test is for Win32 only.
+# Assume .exe extension...this test is for Windows only.
test.fail_test(not os.path.exists('minasm.exe'))
test.up_to_date(arguments='.')
test = TestSCons.TestSCons()
if sys.platform == 'win32':
- sys.stderr.write('Cannot set SHELL separately from other variables on win32.\n')
+ sys.stderr.write('Cannot set SHELL separately from other variables on Windows.\n')
test.no_result(1)
my_shell = test.workpath('my_shell.py')
test.write('SConstruct', """
import sys
-env=Environment(WIN32_INSERT_DEF=1)
+env=Environment(WINDOWS_INSERT_DEF=1)
env2 = Environment(LIBS = [ 'foo1', 'foo2', 'foo3' ],
LIBPATH = [ '.' ])
env.SharedLibrary(target = 'foo1', source = 'f1.c')
env.StaticLibrary(target = 'foo1', source = 'f1.c')
SharedLibrary(target = 'foo2',
source = Split('f2a.c f2b.c f2c.c'),
- WIN32_INSERT_DEF = 1)
+ WINDOWS_INSERT_DEF = 1)
env.SharedLibrary(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'])
env2.Program(target = 'prog', source = 'prog.c')
""")
if sys.platform == 'win32':
# Make sure we don't insert a .def source file (when
- # WIN32_INSERT_DEF is set) and a .lib target file if
+ # WINDOWS_INSERT_DEF is set) and a .lib target file if
# they're specified explicitly.
test.write('SConstructBar', '''
-env = Environment(WIN32_INSERT_DEF=1)
+env = Environment(WINDOWS_INSERT_DEF=1)
env2 = Environment(LIBS = [ 'foo4' ],
LIBPATH = [ '.' ])
env.SharedLibrary(target = ['foo4', 'foo4.lib'], source = ['f4.c', 'foo4.def'])
if bad_drive is None:
print "All drive letters appear to be in use."
- print "Cannot test SCons handling of invalid Win32 drive letters."
+ print "Cannot test SCons handling of invalid Windows drive letters."
test.no_result(1);
test.write('SConstruct', """
test = TestSCons.TestSCons(match = TestCmd.match_re_dotall)
-# MinGW is win32 only:
+# MinGW is Windows only:
if sys.platform != 'win32':
msg = "Skipping mingw test on non-Windows platform '%s'\n" % sys.platform
test.skip_test(msg)
test.write('SConstruct', "")
-# Win32 may or may not print a line for the script version
+# Windows may or may not print a line for the script version
# depending on whether it's invoked through scons.py or scons.bat.
expect1 = r"""SCons by Steven Knight et al.:
\tengine: v\S+, [^,]*, by \S+ on \S+
Mylib.AddCFlags(env, "-DGOOFY_DEMO")
Mylib.AddIncludeDirs(env, ".")
-# Not part of SLF's original stuff: On Win32, it's import to use the
+# Not part of SLF's original stuff: On Windows, it's import to use the
# original test environment when we invoke SCons recursively.
import os
recurse_env = env.Copy()