diff options
| author | Steven Knight <knight@baldmt.com> | 2002-04-22 19:21:26 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2002-04-22 19:21:26 (GMT) |
| commit | 74f98d3083cfbb859bf032dba37ed14bbb5219dd (patch) | |
| tree | 331e7f6b4cb4d8ec98a4cce203ab22f4ba893f9b /test | |
| parent | 9afa958bb1b299c47b3197589ab7b9b89686cc6b (diff) | |
| download | SCons-74f98d3083cfbb859bf032dba37ed14bbb5219dd.zip SCons-74f98d3083cfbb859bf032dba37ed14bbb5219dd.tar.gz SCons-74f98d3083cfbb859bf032dba37ed14bbb5219dd.tar.bz2 | |
Several bug fixes from Charles Crain.
Diffstat (limited to 'test')
| -rw-r--r-- | test/YACC.py | 8 | ||||
| -rw-r--r-- | test/long-lines.py | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/YACC.py b/test/YACC.py index 3e8ea35..486200c 100644 --- a/test/YACC.py +++ b/test/YACC.py @@ -98,7 +98,7 @@ os.system(string.join(sys.argv[1:], " ")) """ % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) test.write('SConstruct', """ -foo = Environment() +foo = Environment(YACCFLAGS='-d') yacc = foo.Dictionary('YACC') bar = Environment(YACC = r'%s wrapper.py ' + yacc) foo.Program(target = 'foo', source = 'foo.y') @@ -150,4 +150,10 @@ newline: '\n'; test.run(program = test.workpath('bar'), stdin = "b\n", stdout = "bar.y\n") + test.fail_test(not os.path.exists(test.workpath('foo.h'))) + + test.run(arguments = '-c .') + + test.fail_test(os.path.exists(test.workpath('foo.h'))) + test.pass_test() diff --git a/test/long-lines.py b/test/long-lines.py index bde101a..9cf24d8 100644 --- a/test/long-lines.py +++ b/test/long-lines.py @@ -25,6 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os +import os.path import string import sys import TestSCons @@ -32,8 +33,12 @@ import TestSCons test = TestSCons.TestSCons() if sys.platform == 'win32': + lib_='' + _dll = '.dll' linkflag = '/LIBPATH:' + test.workpath() else: + lib_='lib' + _dll='.so' linkflag = '-L' + test.workpath() test.write('SConstruct', """ @@ -42,6 +47,8 @@ while len(linkflags) <= 8100: linkflags = linkflags + r' %s' env = Environment(LINKFLAGS = '$LINKXXX', LINKXXX = linkflags) env.Program(target = 'foo', source = 'foo.c') +# Library(shared=1) uses $LINKFLAGS by default. +env.Library(target = 'bar', source = 'foo.c', shared=1) """ % (linkflag, linkflag)) test.write('foo.c', r""" @@ -58,4 +65,6 @@ test.run(arguments = '.') test.run(program = test.workpath('foo'), stdout = "foo.c\n") +test.fail_test(not os.path.exists(lib_+'bar'+_dll)) + test.pass_test() |
