changeset 10110:9ed13f718e53

test-help: improve test coverage Adds a test for displaying the short list of commands with the verbose option i.e. 'hg -v help shortlist'. Extends test coverage of commands.help_ by 2 lines.
author Henri Wiechers <hwiechers@gmail.com>
date Mon, 21 Dec 2009 12:18:43 +0200
parents be041d6714ed
children 27457d31ae3f
files tests/test-help tests/test-help.out
diffstat 2 files changed, 66 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-help	Mon Dec 21 20:30:37 2009 +0100
+++ b/tests/test-help	Mon Dec 21 12:18:43 2009 +0200
@@ -4,6 +4,10 @@
 hg -q
 hg help
 hg -q help
+
+echo %% test short command list with verbose option
+hg -v help shortlist | sed 's/[(]version [^)]*[)]/(version xxx)/'
+
 hg add -h
 hg add --skjdfks
 hg help diff
--- a/tests/test-help.out	Mon Dec 21 20:30:37 2009 +0100
+++ b/tests/test-help.out	Mon Dec 21 12:18:43 2009 +0200
@@ -170,6 +170,68 @@
  templating   Template Usage
  urls         URL Paths
  extensions   Using additional features
+%% test short command list with verbose 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.
+
+basic commands:
+
+ add:
+      add the specified files on the next commit
+ annotate, blame:
+      show changeset information by line for each file
+ clone:
+      make a copy of an existing repository
+ commit, ci:
+      commit the specified files or all outstanding changes
+ diff:
+      diff repository (or selected files)
+ export:
+      dump the header and diffs for one or more changesets
+ forget:
+      forget the specified files on the next commit
+ init:
+      create a new repository in the given directory
+ log, history:
+      show revision history of entire repository or files
+ merge:
+      merge working directory with another revision
+ pull:
+      pull changes from the specified source
+ push:
+      push changes to the specified destination
+ remove, rm:
+      remove the specified files on the next commit
+ serve:
+      export the repository via HTTP
+ status, st:
+      show changed files in the working directory
+ summary, sum:
+      summarize working directory state
+ update, up, checkout, co:
+      update working directory
+
+global options:
+ -R --repository      repository root directory or name of overlay bundle file
+    --cwd             change working directory
+ -y --noninteractive  do not prompt, assume 'yes' for any required answers
+ -q --quiet           suppress output
+ -v --verbose         enable additional output
+    --config          set/override config option
+    --debug           enable debugging output
+    --debugger        start debugger
+    --encoding        set the charset encoding (default: ascii)
+    --encodingmode    set the charset encoding mode (default: strict)
+    --traceback       always print a traceback on exception
+    --time            time how long the command takes
+    --profile         print command execution profile
+    --version         output version information and exit
+ -h --help            display help and exit
+
+use "hg help" for the full list of commands
 hg add [OPTION]... [FILE]...
 
 add the specified files on the next commit