diff options
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() |