diff tests/test-help.t @ 26238:69da16b366ad

help: fix help argument parsing and documentation support combining -c and -e previously -k was misdocumented: * the first line didn't mention it * the help half implied you could do help -k keyword topic with these changes, -k just changes the search method support -c and -e for -k searches
author timeless@mozdev.org
date Thu, 10 Sep 2015 20:22:37 -0400
parents 1c6f7cc52da9
children 8c7d8d5e1e0f
line wrap: on
line diff
--- a/tests/test-help.t	Thu Sep 10 10:48:20 2015 -0400
+++ b/tests/test-help.t	Thu Sep 10 20:22:37 2015 -0400
@@ -988,6 +988,28 @@
       helphook1
       helphook2
 
+Test -e / -c / -k combinations
+
+  $ hg help -c progress
+  abort: no such help topic: progress
+  (try "hg help --keyword progress")
+  [255]
+  $ hg help -e progress |head -1
+  progress extension - show progress bars for some actions (DEPRECATED)
+  $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
+  Commands:
+  $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
+  Extensions:
+  $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
+  Extensions:
+  Commands:
+  $ hg help -c commit > /dev/null
+  $ hg help -e -c commit > /dev/null
+  $ hg help -e commit > /dev/null
+  abort: no such help topic: commit
+  (try "hg help --keyword commit")
+  [255]
+
 Test keyword search help
 
   $ cat > prefixedname.py <<EOF