summaryrefslogtreecommitdiffstats
path: root/test/Win32
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 (GMT)
commit22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch)
tree0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/Win32
parent75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff)
downloadSCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip
SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz
SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2
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.py8
-rw-r--r--test/Win32/default-drive.py3
-rw-r--r--test/Win32/mingw.py7
-rw-r--r--test/Win32/win32pathmadness.py9
4 files changed, 12 insertions, 15 deletions
diff --git a/test/Win32/bad-drive.py b/test/Win32/bad-drive.py
index ffa5aad..f2a55b8 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 84e6389..f427a20 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 969ccfb..3385422 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 875d959..dd04ec4 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),