summaryrefslogtreecommitdiffstats
path: root/test/YACC/YACCCOM.py
diff options
context:
space:
mode:
authorWilliam Blevins <wblevins001@gmail.com>2016-09-22 00:47:35 (GMT)
committerWilliam Blevins <wblevins001@gmail.com>2016-09-22 00:47:35 (GMT)
commitbea6d372a175aff23d05b6a513c2df53aaa6fa87 (patch)
treed5758880a84cd3c2e72e409c6d62783d01edec0e /test/YACC/YACCCOM.py
parent88eb753eb8e65721368beb2fc1247312e2a5ab4c (diff)
downloadSCons-bea6d372a175aff23d05b6a513c2df53aaa6fa87.zip
SCons-bea6d372a175aff23d05b6a513c2df53aaa6fa87.tar.gz
SCons-bea6d372a175aff23d05b6a513c2df53aaa6fa87.tar.bz2
Fixed the YACC tests.
Diffstat (limited to 'test/YACC/YACCCOM.py')
-rw-r--r--test/YACC/YACCCOM.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/test/YACC/YACCCOM.py b/test/YACC/YACCCOM.py
index 4e43676..70ffa72 100644
--- a/test/YACC/YACCCOM.py
+++ b/test/YACC/YACCCOM.py
@@ -34,17 +34,8 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-
-
-test.write('myyacc.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 != '/*yacc*/\\n']:
- outfile.write(l)
-sys.exit(0)
-""")
+test.dir_fixture('shared-fixture')
+test.dir_fixture('YACCCOM-fixture')
test.write('SConstruct', """
env = Environment(tools=['default', 'yacc'],
@@ -53,9 +44,6 @@ env.CFile(target = 'aaa', source = 'aaa.y')
env.CFile(target = 'bbb', source = 'bbb.yacc')
""" % locals())
-test.write('aaa.y', "aaa.y\n/*yacc*/\n")
-test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n")
-
test.run(arguments = '.')
test.must_match('aaa.c', "aaa.y\n")