summaryrefslogtreecommitdiffstats
path: root/test/CXX
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/CXX
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/CXX')
-rw-r--r--test/CXX/CXX.py9
-rw-r--r--test/CXX/CXXCOM.py2
-rw-r--r--test/CXX/CXXCOMSTR.py2
-rw-r--r--test/CXX/CXXFILESUFFIX.py3
-rw-r--r--test/CXX/CXXFLAGS.py3
-rw-r--r--test/CXX/SHCXX.py6
-rw-r--r--test/CXX/SHCXXCOM.py2
-rw-r--r--test/CXX/SHCXXCOMSTR.py2
-rw-r--r--test/CXX/SHCXXFLAGS.py3
9 files changed, 12 insertions, 20 deletions
diff --git a/test/CXX/CXX.py b/test/CXX/CXX.py
index e6bc82b..1e338a6 100644
--- a/test/CXX/CXX.py
+++ b/test/CXX/CXX.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import sys
import TestSCons
@@ -39,7 +38,6 @@ test = TestSCons.TestSCons()
if sys.platform == 'win32':
test.write('mylink.py', r"""
-import string
import sys
args = sys.argv[1:]
while args:
@@ -47,7 +45,7 @@ while args:
if a[0] != '/':
break
args = args[1:]
- if string.lower(a[:5]) == '/out:': out = a[5:]
+ if a[:5].lower() == '/out:': out = a[5:]
infile = open(args[0], 'rb')
outfile = open(out, 'wb')
for l in infile.readlines():
@@ -179,11 +177,10 @@ env.Program(target = 'test6', source = 'test6.C')
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-os.system(string.join(sys.argv[1:], " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+os.system(" ".join(sys.argv[1:]))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()
diff --git a/test/CXX/CXXCOM.py b/test/CXX/CXXCOM.py
index f623eaf..a3da81a 100644
--- a/test/CXX/CXXCOM.py
+++ b/test/CXX/CXXCOM.py
@@ -41,7 +41,7 @@ test.write('mycc.py', r"""
import sys
outfile = open(sys.argv[1], 'wb')
infile = open(sys.argv[2], 'rb')
-for l in filter(lambda l: l[:7] != '/*c++*/', infile.readlines()):
+for l in [l for l in infile.readlines() if l[:7] != '/*c++*/']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/CXX/CXXCOMSTR.py b/test/CXX/CXXCOMSTR.py
index ebacd19..9d54e91 100644
--- a/test/CXX/CXXCOMSTR.py
+++ b/test/CXX/CXXCOMSTR.py
@@ -42,7 +42,7 @@ test.write('mycc.py', r"""
import sys
outfile = open(sys.argv[1], 'wb')
infile = open(sys.argv[2], 'rb')
-for l in filter(lambda l: l != '/*c++*/\n', infile.readlines()):
+for l in [l for l in infile.readlines() if l != '/*c++*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/CXX/CXXFILESUFFIX.py b/test/CXX/CXXFILESUFFIX.py
index 749ca69..8439aef 100644
--- a/test/CXX/CXXFILESUFFIX.py
+++ b/test/CXX/CXXFILESUFFIX.py
@@ -34,12 +34,11 @@ test = TestSCons.TestSCons()
test.write('mylex.py', """
import getopt
-import string
import sys
cmd_opts, args = getopt.getopt(sys.argv[1:], 't', [])
for a in args:
contents = open(a, 'rb').read()
- sys.stdout.write(string.replace(contents, 'LEX', 'mylex.py'))
+ sys.stdout.write(contents.replace('LEX', 'mylex.py'))
sys.exit(0)
""")
diff --git a/test/CXX/CXXFLAGS.py b/test/CXX/CXXFLAGS.py
index f83fe48..8d72708 100644
--- a/test/CXX/CXXFLAGS.py
+++ b/test/CXX/CXXFLAGS.py
@@ -30,7 +30,6 @@ and shared object files.
"""
import os
-import string
import sys
import TestSCons
@@ -39,7 +38,7 @@ _obj = TestSCons._obj
if os.name == 'posix':
os.environ['LD_LIBRARY_PATH'] = '.'
-if string.find(sys.platform, 'irix') > -1:
+if sys.platform.find('irix') > -1:
os.environ['LD_LIBRARYN32_PATH'] = '.'
test = TestSCons.TestSCons()
diff --git a/test/CXX/SHCXX.py b/test/CXX/SHCXX.py
index 6351cfe..9a78881 100644
--- a/test/CXX/SHCXX.py
+++ b/test/CXX/SHCXX.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -35,11 +34,10 @@ test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
-import string
import sys
open('%s', 'wb').write("wrapper.py\\n")
-os.system(string.join(sys.argv[1:], " "))
-""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
+os.system(" ".join(sys.argv[1:]))
+""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
foo = Environment()
diff --git a/test/CXX/SHCXXCOM.py b/test/CXX/SHCXXCOM.py
index 7c5e45f..0f0940b 100644
--- a/test/CXX/SHCXXCOM.py
+++ b/test/CXX/SHCXXCOM.py
@@ -41,7 +41,7 @@ test.write('mycc.py', r"""
import sys
outfile = open(sys.argv[1], 'wb')
infile = open(sys.argv[2], 'rb')
-for l in filter(lambda l: l[:7] != '/*c++*/', infile.readlines()):
+for l in [l for l in infile.readlines() if l[:7] != '/*c++*/']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/CXX/SHCXXCOMSTR.py b/test/CXX/SHCXXCOMSTR.py
index afe647a..716c9ad 100644
--- a/test/CXX/SHCXXCOMSTR.py
+++ b/test/CXX/SHCXXCOMSTR.py
@@ -42,7 +42,7 @@ test.write('mycc.py', r"""
import sys
outfile = open(sys.argv[1], 'wb')
infile = open(sys.argv[2], 'rb')
-for l in filter(lambda l: l != '/*c++*/\n', infile.readlines()):
+for l in [l for l in infile.readlines() if l != '/*c++*/\n']:
outfile.write(l)
sys.exit(0)
""")
diff --git a/test/CXX/SHCXXFLAGS.py b/test/CXX/SHCXXFLAGS.py
index a4d552e..343be30 100644
--- a/test/CXX/SHCXXFLAGS.py
+++ b/test/CXX/SHCXXFLAGS.py
@@ -29,7 +29,6 @@ Verify that $SHCXXFLAGS settings are used to build shared object files.
"""
import os
-import string
import sys
import TestSCons
@@ -38,7 +37,7 @@ _obj = TestSCons._obj
if os.name == 'posix':
os.environ['LD_LIBRARY_PATH'] = '.'
-if string.find(sys.platform, 'irix') > -1:
+if sys.platform.find('irix') > -1:
os.environ['LD_LIBRARYN32_PATH'] = '.'
test = TestSCons.TestSCons()