test-help: improve test coverage
Adds a test for using the help option with the version option.
Extends test coverage of commands.help_ by another 2 lines.
--- a/tests/test-help Wed Dec 23 18:13:15 2009 +0100
+++ b/tests/test-help Mon Dec 21 23:01:46 2009 +0200
@@ -9,6 +9,10 @@
hg -v help shortlist | sed 's/[(]version [^)]*[)]/(version xxx)/'
hg add -h
+
+echo %% test help option with version option
+hg add -h --version | sed 's/[(]version [^)]*[)]/(version xxx)/'
+
hg add --skjdfks
hg help diff
hg help status
--- a/tests/test-help.out Wed Dec 23 18:13:15 2009 +0100
+++ b/tests/test-help.out Mon Dec 21 23:01:46 2009 +0200
@@ -250,6 +250,31 @@
-n --dry-run do not perform actions, just print output
use "hg -v help add" to show global options
+%% test help option with version option
+Mercurial Distributed SCM (version xxx)
+
+Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+hg add [OPTION]... [FILE]...
+
+add the specified files on the next commit
+
+ Schedule files to be version controlled and added to the repository.
+
+ The files will be added to the repository at the next commit. To undo an
+ add before that, see hg forget.
+
+ If no names are given, add all files to the repository.
+
+options:
+
+ -I --include include names matching the given patterns
+ -X --exclude exclude names matching the given patterns
+ -n --dry-run do not perform actions, just print output
+
+use "hg -v help add" to show global options
hg add: option --skjdfks not recognized
hg add [OPTION]... [FILE]...