summaryrefslogtreecommitdiffstats
path: root/test/LEX.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/LEX.py')
-rw-r--r--test/LEX.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/LEX.py b/test/LEX.py
index 90549bd..3f596fb 100644
--- a/test/LEX.py
+++ b/test/LEX.py
@@ -51,6 +51,7 @@ sys.exit(0)
test.write('SConstruct', """
env = Environment(LEX = r'%s mylex.py', tools=['default', 'lex'])
env.Program(target = 'aaa', source = 'aaa.l')
+env.Program(target = 'bbb', source = 'bbb.lex')
""" % python)
test.write('aaa.l', r"""
@@ -64,9 +65,21 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = 'aaa' + _exe, stderr = None)
+test.write('bbb.lex', r"""
+int
+main(int argc, char *argv[])
+{
+ argv[argc++] = "--";
+ printf("LEX\n");
+ printf("bbb.lex\n");
+ exit (0);
+}
+""")
+
+test.run(arguments = '.', stderr = None)
test.run(program = test.workpath('aaa' + _exe), stdout = "mylex.py\naaa.l\n")
+test.run(program = test.workpath('bbb' + _exe), stdout = "mylex.py\nbbb.lex\n")