diff options
author | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
---|---|---|
committer | William Blevins <wblevins001@gmail.com> | 2016-10-03 06:08:04 (GMT) |
commit | 5587089a661a520a32c353ea886939cd63a0636a (patch) | |
tree | 22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/AS/ASPPCOMSTR.py | |
parent | 6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff) | |
download | SCons-5587089a661a520a32c353ea886939cd63a0636a.zip SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.gz SCons-5587089a661a520a32c353ea886939cd63a0636a.tar.bz2 |
Moved common my<xxx>.py functions to global fixture and resolve byte/str.
Diffstat (limited to 'test/AS/ASPPCOMSTR.py')
-rw-r--r-- | test/AS/ASPPCOMSTR.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/test/AS/ASPPCOMSTR.py b/test/AS/ASPPCOMSTR.py index 0497470..0ee18f5 100644 --- a/test/AS/ASPPCOMSTR.py +++ b/test/AS/ASPPCOMSTR.py @@ -35,27 +35,18 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() - - -test.write('myas.py', r""" -import sys -infile = open(sys.argv[2], 'rb') -outfile = open(sys.argv[1], 'wb') -for l in [l for l in infile.readlines() if l != b"#as\n"]: - outfile.write(l) -sys.exit(0) -""") +test.file_fixture('mycompile.py') test.write('SConstruct', """ -env = Environment(ASPPCOM = r'%(_python_)s myas.py $TARGET $SOURCE', +env = Environment(ASPPCOM = r'%(_python_)s mycompile.py as $TARGET $SOURCE', ASPPCOMSTR = 'Assembling $TARGET from $SOURCE', OBJSUFFIX = '.obj') env.Object(target = 'test1', source = 'test1.spp') env.Object(target = 'test2', source = 'test2.SPP') """ % locals()) -test.write('test1.spp', "test1.spp\n#as\n") -test.write('test2.SPP', "test2.SPP\n#as\n") +test.write('test1.spp', "test1.spp\n/*as*/\n") +test.write('test2.SPP', "test2.SPP\n/*as*/\n") test.run(stdout = test.wrap_stdout("""\ Assembling test1.obj from test1.spp @@ -65,8 +56,6 @@ Assembling test2.obj from test2.SPP test.must_match('test1.obj', "test1.spp\n") test.must_match('test2.obj', "test2.SPP\n") - - test.pass_test() # Local Variables: |