diff options
Diffstat (limited to 'test/TAR')
-rw-r--r-- | test/TAR/TARCOM.py | 15 | ||||
-rw-r--r-- | test/TAR/TARCOMSTR.py | 16 |
2 files changed, 4 insertions, 27 deletions
diff --git a/test/TAR/TARCOM.py b/test/TAR/TARCOM.py index d1b3662..aaf7b60 100644 --- a/test/TAR/TARCOM.py +++ b/test/TAR/TARCOM.py @@ -34,20 +34,11 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() - - -test.write('mytar.py', r""" -import sys -outfile = open(sys.argv[1], 'wb') -infile = open(sys.argv[2], 'rb') -for l in [l for l in infile.readlines() if l != '/*tar*/\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(TOOLS = ['tar'], - TARCOM = r'%(_python_)s mytar.py $TARGET $SOURCE') + TARCOM = r'%(_python_)s mycompile.py tar $TARGET $SOURCE') env.Tar('test1.tar', 'test1.in') """ % locals()) @@ -60,8 +51,6 @@ test.run() test.must_match('test1.tar', "test1.in\n") - - test.pass_test() # Local Variables: diff --git a/test/TAR/TARCOMSTR.py b/test/TAR/TARCOMSTR.py index 339f0ca..817dc59 100644 --- a/test/TAR/TARCOMSTR.py +++ b/test/TAR/TARCOMSTR.py @@ -35,21 +35,11 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() - - -test.write('mytar.py', """ -import sys -outfile = open(sys.argv[1], 'wb') -for f in sys.argv[2:]: - infile = open(f, 'rb') - for l in [l for l in infile.readlines() if l != '/*tar*/\\n']: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ env = Environment(tools=['tar'], - TARCOM = r'%(_python_)s mytar.py $TARGET $SOURCES', + TARCOM = r'%(_python_)s mycompile.py tar $TARGET $SOURCES', TARCOMSTR = 'Taring $TARGET from $SOURCE') env.Tar('aaa.tar', 'aaa.in') """ % locals()) @@ -62,8 +52,6 @@ Taring aaa.tar from aaa.in test.must_match('aaa.tar', "aaa.in\n") - - test.pass_test() # Local Variables: |