diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CommandGenerator.py | 2 | ||||
-rw-r--r-- | test/long-lines.py | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/CommandGenerator.py b/test/CommandGenerator.py index a85b07a..9a2a7c7 100644 --- a/test/CommandGenerator.py +++ b/test/CommandGenerator.py @@ -42,7 +42,7 @@ sys.exit(0) """) test.write('SConstruct', """ -def g(source, target, env): +def g(source, target, for_signature, env): import sys python = sys.executable return [[python, "build.py", "$TEMPFILE"] + source, diff --git a/test/long-lines.py b/test/long-lines.py index 9cf24d8..521ed2c 100644 --- a/test/long-lines.py +++ b/test/long-lines.py @@ -35,10 +35,12 @@ test = TestSCons.TestSCons() if sys.platform == 'win32': lib_='' _dll = '.dll' + _export = '__declspec(dllexport) ' linkflag = '/LIBPATH:' + test.workpath() else: lib_='lib' _dll='.so' + _export='' linkflag = '-L' + test.workpath() test.write('SConstruct', """ @@ -52,6 +54,8 @@ env.Library(target = 'bar', source = 'foo.c', shared=1) """ % (linkflag, linkflag)) test.write('foo.c', r""" +%svoid foo() { } + int main(int argc, char *argv[]) { @@ -59,10 +63,12 @@ main(int argc, char *argv[]) printf("foo.c\n"); exit (0); } -""") +""" % _export) test.run(arguments = '.') +test.up_to_date(arguments = '.') + test.run(program = test.workpath('foo'), stdout = "foo.c\n") test.fail_test(not os.path.exists(lib_+'bar'+_dll)) |