diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/special-filenames.py | |
parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
download | SCons-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/special-filenames.py')
-rw-r--r-- | test/special-filenames.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/special-filenames.py b/test/special-filenames.py index 86a6e59..00e4a3d 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() |