summaryrefslogtreecommitdiff
path: root/test/special-filenames.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 +0000
committerGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 +0000
commitaf6d7c35464bb75dcabc72094b4bd84154dde50d (patch)
tree0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/special-filenames.py
parent55ef7fe83e3211be3045f089767ca8e198db1c2c (diff)
downloadscons-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/special-filenames.py')
-rw-r--r--test/special-filenames.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/special-filenames.py b/test/special-filenames.py
index 86a6e59c..00e4a3df 100644
--- a/test/special-filenames.py
+++ b/test/special-filenames.py
@@ -24,8 +24,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import string
-
import TestSCons
_python_ = TestSCons._python_
@@ -57,7 +55,7 @@ open(sys.argv[1], 'wb').write(open(sys.argv[2], 'rb').read())
file_names = []
for fn in attempt_file_names:
try:
- in_name = string.replace(fn, '$$', '$') + '.in'
+ in_name = fn.replace('$$', '$') + '.in'
test.write(in_name, fn + '\n')
file_names.append(fn)
except IOError:
@@ -68,7 +66,7 @@ for fn in attempt_file_names:
def buildFileStr(fn):
return "env.Build(source=r\"\"\"%s.in\"\"\", target=r\"\"\"%s.out\"\"\")" % ( fn, fn )
-xxx = string.join(map(buildFileStr, file_names), '\n')
+xxx = '\n'.join(map(buildFileStr, file_names))
test.write("SConstruct", """
env=Environment(BUILDERS = {'Build' : Builder(action = '%(_python_)s cat.py $TARGET $SOURCE')})
@@ -79,7 +77,7 @@ env=Environment(BUILDERS = {'Build' : Builder(action = '%(_python_)s cat.py $TAR
test.run(arguments='.')
for fn in file_names:
- out_name = string.replace(fn, '$$', '$') + '.out'
+ out_name = fn.replace('$$', '$') + '.out'
test.fail_test(test.read(out_name) != fn + '\n')
test.pass_test()