diff options
Diffstat (limited to 'test/AR/ARCOM.py')
-rw-r--r-- | test/AR/ARCOM.py | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/test/AR/ARCOM.py b/test/AR/ARCOM.py index bf2830e..f9d0038 100644 --- a/test/AR/ARCOM.py +++ b/test/AR/ARCOM.py @@ -34,39 +34,25 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() - - -test.write('myar.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 != b'/*ar*/\\n']: - outfile.write(l) -sys.exit(0) -""") - -test.write('myranlib.py', """ -""") +test.file_fixture('mycompile.py') +test.file_fixture('myrewrite.py') test.write('SConstruct', """ env = Environment(tools=['default', 'ar'], - ARCOM = r'%(_python_)s myar.py $TARGET $SOURCES', - RANLIBCOM = r'%(_python_)s myranlib.py $TARGET', + ARCOM = r'%(_python_)s mycompile.py ar $TARGET $SOURCES', + RANLIBCOM = r'%(_python_)s myrewrite.py ranlib $TARGET', LIBPREFIX = '', LIBSUFFIX = '.lib') env.Library(target = 'output', source = ['file.1', 'file.2']) """ % locals()) -test.write('file.1', "file.1\n/*ar*/\n") -test.write('file.2', "file.2\n/*ar*/\n") +test.write('file.1', "file.1\n/*ar*/\n/*ranlib*/\n") +test.write('file.2', "file.2\n/*ar*/\n/*ranlib*/\n") test.run(arguments = '.') test.must_match('output.lib', "file.1\nfile.2\n") - - test.pass_test() # Local Variables: |