test-help: improve test coverage
authorHenri Wiechers <hwiechers@gmail.com>
Thu, 24 Dec 2009 18:53:34 +0200
changeset 10139 d09bed527343
parent 10138 8e0bd0307ba2
child 10140 5d868e0565f6
test-help: improve test coverage Adds a test for handling ambiguous command help Extends test coverage of commands.help_ by 4 lines.
tests/test-help
tests/test-help.out
--- a/tests/test-help	Thu Dec 24 11:41:06 2009 +0100
+++ b/tests/test-help	Thu Dec 24 18:53:34 2009 +0200
@@ -14,6 +14,10 @@
 hg add -h --version | sed 's/[(]version [^)]*[)]/(version xxx)/'
 
 hg add --skjdfks
+
+echo %% test ambiguous command help
+hg help ad
+
 hg help diff
 hg help status
 hg -q help status
--- a/tests/test-help.out	Thu Dec 24 11:41:06 2009 +0100
+++ b/tests/test-help.out	Thu Dec 24 18:53:34 2009 +0200
@@ -294,6 +294,13 @@
  -n --dry-run  do not perform actions, just print output
 
 use "hg -v help add" to show global options
+%% test ambiguous command help
+list of commands:
+
+ add         add the specified files on the next commit
+ addremove   add all new files, delete all missing files
+
+use "hg -v help ad" to show aliases and global options
 hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...
 
 diff repository (or selected files)