diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 +0000 |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 +0000 |
commit | af6d7c35464bb75dcabc72094b4bd84154dde50d (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/Win32 | |
parent | 55ef7fe83e3211be3045f089767ca8e198db1c2c (diff) | |
download | scons-af6d7c35464bb75dcabc72094b4bd84154dde50d.tar.gz |
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'test/Win32')
-rw-r--r-- | test/Win32/bad-drive.py | 8 | ||||
-rw-r--r-- | test/Win32/default-drive.py | 3 | ||||
-rw-r--r-- | test/Win32/mingw.py | 7 | ||||
-rw-r--r-- | test/Win32/win32pathmadness.py | 9 |
4 files changed, 12 insertions, 15 deletions
diff --git a/test/Win32/bad-drive.py b/test/Win32/bad-drive.py index ffa5aad9..f2a55b8c 100644 --- a/test/Win32/bad-drive.py +++ b/test/Win32/bad-drive.py @@ -31,8 +31,8 @@ with an invalid drive letter. __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import sys +from string import uppercase import TestSCons @@ -43,8 +43,8 @@ if sys.platform != 'win32': test.skip_test(msg) bad_drive = None -for i in range(len(string.uppercase)-1, -1, -1): - d = string.uppercase[i] +for i in range(len(uppercase)-1, -1, -1): + d = uppercase[i] if not os.path.isdir(d + ':' + os.sep): bad_drive = d + ':' break @@ -57,7 +57,7 @@ if bad_drive is None: test.write('SConstruct', """ def cat(env, source, target): target = str(target[0]) - source = map(str, source) + source = list(map(str, source)) print 'cat(%%s) > %%s' %% (source, target) f = open(target, "wb") for src in source: diff --git a/test/Win32/default-drive.py b/test/Win32/default-drive.py index 84e6389f..f427a203 100644 --- a/test/Win32/default-drive.py +++ b/test/Win32/default-drive.py @@ -46,10 +46,9 @@ test.subdir('src') test.write(['src', 'SConstruct'], """ def cat(env, source, target): target = str(target[0]) - source = map(str, source) f = open(target, "wb") for src in source: - f.write(open(src, "rb").read()) + f.write(open(str(src), "rb").read()) f.close() env = Environment(BUILDERS={'Build':Builder(action=cat)}) diff --git a/test/Win32/mingw.py b/test/Win32/mingw.py index 969ccfbf..33854224 100644 --- a/test/Win32/mingw.py +++ b/test/Win32/mingw.py @@ -29,7 +29,6 @@ This tests the MinGW C/C++ compiler support. __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os -import string import sys import TestSCons @@ -53,7 +52,7 @@ sys.exit(0) """) test.run() -if string.find(test.stdout(), 'mingw exists') == -1: +if test.stdout().find('mingw exists') == -1: test.skip_test("No MinGW on this system, skipping test.\n") test.subdir('header') @@ -149,8 +148,8 @@ test.write('header/resource2.h', ''' # that comes out of stderr: test.run(arguments='test.exe', stderr='.*') # ensure the source def for cshared.def got used, and there wasn't a target def for chshared.dll: -test.fail_test(string.find(test.stdout(), 'cshared.def') == -1) -test.fail_test(string.find(test.stdout(), '-Wl,--output-def,cshared.def') != -1) +test.fail_test(test.stdout().find('cshared.def') == -1) +test.fail_test(test.stdout().find('-Wl,--output-def,cshared.def') != -1) # ensure the target def got generated for the shared.dll: test.fail_test(not os.path.exists(test.workpath('shared.def'))) test.run(program=test.workpath('test.exe'), stdout='test.cpp\nshared.cpp\nstatic.cpp\ncshared.c\n2001 resource.rc\n') diff --git a/test/Win32/win32pathmadness.py b/test/Win32/win32pathmadness.py index 875d9598..dd04ec4d 100644 --- a/test/Win32/win32pathmadness.py +++ b/test/Win32/win32pathmadness.py @@ -33,7 +33,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons import sys import TestCmd -import string import os.path test = TestSCons.TestSCons(match=TestCmd.match_re) @@ -89,10 +88,10 @@ int bar(void); drive, rest = os.path.splitdrive(test.workpath('src')) -drive_upper = string.upper(drive) -drive_lower = string.lower(drive) -rest_upper = rest[0] + string.upper(rest[1]) + rest[2:] -rest_lower = rest[0] + string.lower(rest[1]) + rest[2:] +drive_upper = drive.upper() +drive_lower = drive.lower() +rest_upper = rest[0] + rest[1].upper() + rest[2:] +rest_lower = rest[0] + rest[1].lower() + rest[2:] combinations = [ os.path.join(drive_upper, rest_upper), |