diff options
| author | Steven Knight <knight@baldmt.com> | 2001-09-12 02:20:03 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2001-09-12 02:20:03 (GMT) |
| commit | e3e7b09d110ace0334c941eec930f3d651fe1151 (patch) | |
| tree | e22e75f5e4a2a5aa75afd5e9fc3d7d1d76082da5 /test | |
| parent | 08994e034cbc908eefe3e8acf3f002da68e77243 (diff) | |
| download | SCons-e3e7b09d110ace0334c941eec930f3d651fe1151.zip SCons-e3e7b09d110ace0334c941eec930f3d651fe1151.tar.gz SCons-e3e7b09d110ace0334c941eec930f3d651fe1151.tar.bz2 | |
Fixes for -f end cases.
Diffstat (limited to 'test')
| -rw-r--r-- | test/errors.py | 2 | ||||
| -rw-r--r-- | test/option-f.py | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/test/errors.py b/test/errors.py index 04eac9e..a4b05cc 100644 --- a/test/errors.py +++ b/test/errors.py @@ -49,7 +49,7 @@ expect = r"""Traceback \((most recent call|innermost) last\): File "%s", line \d+, in \? main\(\) File "%s", line \d+, in main - execfile\(file\) + exec f File "SConstruct3", line \d+, in \? raise InternalError, 'error inside' InternalError: error inside diff --git a/test/option-f.py b/test/option-f.py index 4ea2ee9..b9dbd75 100644 --- a/test/option-f.py +++ b/test/option-f.py @@ -27,26 +27,45 @@ wpath = test.workpath() test.run(chdir = '.', arguments = '-f SConscript') test.fail_test(test.stdout() != ("SConscript %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '-f ' + subdir_BuildThis) test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--file=SConscript') test.fail_test(test.stdout() != ("SConscript %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--file=' + subdir_BuildThis) test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--makefile=SConscript') test.fail_test(test.stdout() != ("SConscript %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--makefile=' + subdir_BuildThis) test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--sconstruct=SConscript') test.fail_test(test.stdout() != ("SConscript %s\n" % wpath)) +test.fail_test(test.stderr() != "") test.run(chdir = '.', arguments = '--sconstruct=' + subdir_BuildThis) test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath)) +test.fail_test(test.stderr() != "") + +test.run(chdir = '.', arguments = '-f -', stdin = """ +import os +print "STDIN " + os.getcwd() +""") +test.fail_test(test.stdout() != ("STDIN %s\n" % wpath)) +test.fail_test(test.stderr() != "") + +test.run(chdir = '.', arguments = '-f no_such_file') +test.fail_test(test.stdout() != "") +test.fail_test(test.stderr() != "Ignoring missing script 'no_such_file'\n") test.pass_test() |
