diff options
author | Steven Knight <knight@baldmt.com> | 2009-03-06 02:14:24 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-03-06 02:14:24 (GMT) |
commit | 47a5f6f17fa7f72065bd42dec4d645e5c1325aef (patch) | |
tree | fd72838bc3195ba2cc25205623db6bd523dcabef /test | |
parent | d6d135367931bcab667ce5d636e905d9712d6370 (diff) | |
download | SCons-47a5f6f17fa7f72065bd42dec4d645e5c1325aef.zip SCons-47a5f6f17fa7f72065bd42dec4d645e5c1325aef.tar.gz SCons-47a5f6f17fa7f72065bd42dec4d645e5c1325aef.tar.bz2 |
Issue 2368: Fix an exception when a null command-line argument is
passed in.
Diffstat (limited to 'test')
-rw-r--r-- | test/no-arguments.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/no-arguments.py b/test/no-arguments.py index 46c06fb..0fa0d8a 100644 --- a/test/no-arguments.py +++ b/test/no-arguments.py @@ -26,8 +26,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Verify that we use a default target of the current directory when there -are no command-line arguments (and, implicitly, no Default() in the -SConstruct). +is no Default() in the SConstruct file and there are no command-line +arguments, or a null command-line argument. """ import os.path @@ -52,10 +52,21 @@ env.Build('aaa.out', 'aaa.in') test.write('aaa.in', "aaa.in\n") +up_to_date = test.wrap_stdout("scons: `.' is up to date.\n") + # test.run() +test.must_match('aaa.out', "aaa.in\n") +test.run(stdout=up_to_date) + +# +test.unlink('aaa.out') +test.must_not_exist('aaa.out') -test.fail_test(test.read('aaa.out') != "aaa.in\n") +# +test.run(['']) +test.must_match('aaa.out', "aaa.in\n") +test.run([''], stdout=up_to_date) # test.pass_test() |