summaryrefslogtreecommitdiffstats
path: root/test/AS/ASPPCOM.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-10-03 06:08:04 (GMT)
commit5587089a661a520a32c353ea886939cd63a0636a (patch)
tree22bf17e710505ff6f6bcf5cc4aa7badfc958d5f2 /test/AS/ASPPCOM.py
parent6dd3fd8b838d18d65edd6e7adabf3a363437f8a9 (diff)
downloadSCons-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/ASPPCOM.py')
-rw-r--r--test/AS/ASPPCOM.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/test/AS/ASPPCOM.py b/test/AS/ASPPCOM.py
index 62f859a..ce938bb 100644
--- a/test/AS/ASPPCOM.py
+++ b/test/AS/ASPPCOM.py
@@ -34,19 +34,10 @@ _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',
OBJSUFFIX = '.obj',
SHOBJPREFIX = '',
SHOBJSUFFIX = '.shobj')
@@ -56,10 +47,10 @@ env.SharedObject(target = 'test3', source = 'test3.spp')
env.SharedObject(target = 'test4', source = 'test4.SPP')
""" % locals())
-test.write('test1.spp', "test1.spp\n#as\n")
-test.write('test2.SPP', "test2.SPP\n#as\n")
-test.write('test3.spp', "test3.spp\n#as\n")
-test.write('test4.SPP', "test4.SPP\n#as\n")
+test.write('test1.spp', "test1.spp\n/*as*/\n")
+test.write('test2.SPP', "test2.SPP\n/*as*/\n")
+test.write('test3.spp', "test3.spp\n/*as*/\n")
+test.write('test4.SPP', "test4.SPP\n/*as*/\n")
test.run(arguments = '.')
@@ -68,8 +59,6 @@ test.must_match('test2.obj', "test2.SPP\n")
test.must_match('test3.shobj', "test3.spp\n")
test.must_match('test4.shobj', "test4.SPP\n")
-
-
test.pass_test()
# Local Variables: