summaryrefslogtreecommitdiffstats
path: root/test/YACC/YACCFLAGS.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/YACC/YACCFLAGS.py')
-rw-r--r--test/YACC/YACCFLAGS.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/test/YACC/YACCFLAGS.py b/test/YACC/YACCFLAGS.py
index f0b698b..b3f86fe 100644
--- a/test/YACC/YACCFLAGS.py
+++ b/test/YACC/YACCFLAGS.py
@@ -43,27 +43,7 @@ test = TestSCons.TestSCons()
test.subdir('in')
-
-
-test.write('myyacc.py', """
-import getopt
-import sys
-cmd_opts, args = getopt.getopt(sys.argv[1:], 'o:I:x', [])
-output = None
-opt_string = ''
-i_arguments = ''
-for opt, arg in cmd_opts:
- if opt == '-o': output = open(arg, 'wb')
- elif opt == '-I': i_arguments = i_arguments + ' ' + arg
- else: opt_string = opt_string + ' ' + opt
-for a in args:
- contents = open(a, 'rb').read()
- contents = contents.replace('YACCFLAGS', opt_string)
- contents = contents.replace('I_ARGS', i_arguments)
- output.write(contents)
-output.close()
-sys.exit(0)
-""")
+test.dir_fixture('YACCFLAGS-fixture')
test.write('SConstruct', """
env = Environment(YACC = r'%(_python_)s myyacc.py',