From: stevenknight Date: Fri, 11 Feb 2005 03:08:06 +0000 (+0000) Subject: Display the help message when -u -h is supplied. (Elliot Murphy) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9240b5d0f3085f368f4d8ff1fcf081b38409670;p=scons.git Display the help message when -u -h is supplied. (Elliot Murphy) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1226 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index de12b228..8f198602 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -221,6 +221,8 @@ RELEASE 0.97 - XXX - Enhance the tests to guarantee persistence of ListOption values in saved options files. + - Supply the help text when -h is used with the -u, -U or -D options. + From Christian Neeb: - Fix the Java parser's handling of string definitions to avoid ignoring diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 71f6d618..f50273ec 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -868,8 +868,6 @@ def _main(args, parser): if script_dir: display("scons: Entering directory `%s'" % script_dir) os.chdir(script_dir) - else: - raise SCons.Errors.UserError, "No SConstruct file found." fs.set_toplevel_dir(os.getcwd()) diff --git a/test/option-h.py b/test/option-h.py index e70de1b3..7b36c245 100644 --- a/test/option-h.py +++ b/test/option-h.py @@ -31,14 +31,29 @@ import sys test = TestSCons.TestSCons() test.run(arguments = '-h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) + +test.run(arguments = '-u -h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) + +test.run(arguments = '-U -h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) +test.run(arguments = '-D -h') test.fail_test(string.find(test.stdout(), '-h, --help') == -1) test.write('SConstruct', "") test.run(arguments = '-h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) + +test.run(arguments = '-u -h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) + +test.run(arguments = '-U -h') +test.fail_test(string.find(test.stdout(), '-h, --help') == -1) +test.run(arguments = '-D -h') test.fail_test(string.find(test.stdout(), '-h, --help') == -1) test.pass_test() -