summaryrefslogtreecommitdiffstats
path: root/test/LEX/LEXFLAGS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2007-01-07 07:23:05 (GMT)
committerSteven Knight <knight@baldmt.com>2007-01-07 07:23:05 (GMT)
commit8e31352a5b5a500263a8d0d3aee7288970a67b4c (patch)
tree05e6aee9b46b530443e01bbb762b68775a6bb0ff /test/LEX/LEXFLAGS.py
parenta4fa510f9025ccb4ffeddefe26ce17e01c6a2b8f (diff)
downloadSCons-8e31352a5b5a500263a8d0d3aee7288970a67b4c.zip
SCons-8e31352a5b5a500263a8d0d3aee7288970a67b4c.tar.gz
SCons-8e31352a5b5a500263a8d0d3aee7288970a67b4c.tar.bz2
Merged revisions 1738-1754,1756 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core ........ r1741 | stevenknight | 2006-12-16 22:51:07 -0600 (Sat, 16 Dec 2006) | 1 line 0.96.D527 - Give the f90 and f95 Tool modules knowledge of how to build source files of earlier Fortran versions. ........ r1742 | stevenknight | 2006-12-16 23:22:54 -0600 (Sat, 16 Dec 2006) | 1 line 0.96.D528 - Better handling of timestamp fallback if there's no md5 module. ........ r1743 | stevenknight | 2006-12-17 00:21:31 -0600 (Sun, 17 Dec 2006) | 1 line 0.96.D529 - Fix portability of new tests on systems that don't have TeX installed. ........ r1744 | stevenknight | 2006-12-19 15:30:16 -0600 (Tue, 19 Dec 2006) | 1 line 0.96.D530 - Eliminate the ListBuilder subclass in favor of using the Executor's target lists. ........ r1745 | stevenknight | 2006-12-19 18:54:26 -0600 (Tue, 19 Dec 2006) | 1 line 0.96.D531 - Eliminate of MultiStepBuilder as a separate Builder subclass. ........ r1746 | garyo | 2006-12-21 13:21:08 -0600 (Thu, 21 Dec 2006) | 1 line Minor doc fix, thanks to Douglas Landgraf. ........ r1747 | stevenknight | 2006-12-21 17:13:55 -0600 (Thu, 21 Dec 2006) | 1 line 0.96.D533 - Add CFLAGS for options common to C/C++. (Gary Oberbrunner) ........ r1748 | stevenknight | 2007-01-03 19:48:05 -0600 (Wed, 03 Jan 2007) | 1 line 0.96.D534 - Fix signature storage when targets are retrieved from CacheDir(). ........ r1749 | stevenknight | 2007-01-04 16:48:47 -0600 (Thu, 04 Jan 2007) | 1 line 0.96.D535 - Teach the lex and yacc tools about target files generated by different flex/bison options, and about Objective C suffixes. (Pupeno) ........ r1750 | stevenknight | 2007-01-04 17:14:38 -0600 (Thu, 04 Jan 2007) | 1 line 0.96.D536 - Refactor duplicate disambiguation logic in Entry.get_contents(). ........ r1751 | stevenknight | 2007-01-05 13:00:54 -0600 (Fri, 05 Jan 2007) | 1 line 0.96.D537 - Fix lprof regression from 0.96.92. ........ r1752 | stevenknight | 2007-01-05 20:43:48 -0600 (Fri, 05 Jan 2007) | 1 line 0.96.D538 - Fix caching of Builder suffix matching (to fix lprof regression). ........ r1753 | stevenknight | 2007-01-06 00:03:16 -0600 (Sat, 06 Jan 2007) | 1 line 0.96.D539 - Fix --include-dir when using MinGW. (Paul) ........ r1754 | stevenknight | 2007-01-06 00:24:53 -0600 (Sat, 06 Jan 2007) | 1 line 0.96.D540 - Make bootstrap.py something useful to execute SCons out of a source directory. ........ r1756 | stevenknight | 2007-01-06 21:32:11 -0600 (Sat, 06 Jan 2007) | 1 line 0.96.D541 - Update the Copyright year string to include 2007. Automate updating the month+year string in man page title headers. Fix hard-coded __revision__ strings that crept into some older tests. ........
Diffstat (limited to 'test/LEX/LEXFLAGS.py')
-rw-r--r--test/LEX/LEXFLAGS.py63
1 files changed, 6 insertions, 57 deletions
diff --git a/test/LEX/LEXFLAGS.py b/test/LEX/LEXFLAGS.py
index 5923934..b6a06fa 100644
--- a/test/LEX/LEXFLAGS.py
+++ b/test/LEX/LEXFLAGS.py
@@ -55,68 +55,17 @@ test.write('SConstruct', """
env = Environment(LEX = r'%(_python_)s mylex.py',
LEXFLAGS = '-x',
tools=['default', 'lex'])
-env.Program(target = 'aaa', source = 'aaa.l')
+env.CFile(target = 'aaa', source = 'aaa.l')
""" % locals())
-test.write('aaa.l', r"""
-int
-main(int argc, char *argv[])
-{
- argv[argc++] = "--";
- printf("LEXFLAGS\n");
- printf("aaa.l\n");
- exit (0);
-}
-""")
-
-test.run(arguments = 'aaa' + _exe, stderr = None)
-
-test.run(program = test.workpath('aaa' + _exe), stdout = " -x -t\naaa.l\n")
-
-
-
-lex = test.where_is('lex')
-
-if lex:
-
- test.write('SConstruct', """
-foo = Environment()
-bar = Environment(LEXFLAGS = '-b')
-foo.Program(target = 'foo', source = 'foo.l')
-bar.Program(target = 'bar', source = 'bar.l')
-""")
-
- lex = r"""
-%%%%
-a printf("A%sA");
-b printf("B%sB");
-%%%%
-int
-yywrap()
-{
- return 1;
-}
-
-main()
-{
- yylex();
-}
-"""
-
- test.write('foo.l', lex % ('foo.l', 'foo.l'))
-
- test.write('bar.l', lex % ('bar.l', 'bar.l'))
-
- test.run(arguments = 'foo' + _exe, stderr = None)
-
- test.fail_test(os.path.exists(test.workpath('lex.backup')))
+test.write('aaa.l', "aaa.l\nLEXFLAGS\n")
- test.run(program = test.workpath('foo'), stdin = "a\n", stdout = "Afoo.lA\n")
+test.run('.', stderr = None)
- test.run(arguments = 'bar' + _exe)
+# Read in with mode='r' because mylex.py implicitley wrote to stdout
+# with mode='w'.
+test.must_match('aaa.c', "aaa.l\n -x -t\n", mode='r')
- test.fail_test(not os.path.exists(test.workpath('lex.backup')))
- test.run(program = test.workpath('bar'), stdin = "b\n", stdout = "Bbar.lB\n")
test.pass_test()