Mercurial > hg
changeset 33326:67b42e64194d
tests: add tests for typoed commands
This includes one test showing how disabling a command with e.g.
"extensions.rebase=!" results in the command not being
suggested. We'll fix that next.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 07 Jul 2017 00:12:44 -0700 |
parents | 38df146d0697 |
children | 68b7ceda99d7 |
files | tests/test-help.t |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-help.t Thu Jul 06 16:10:28 2017 -0700 +++ b/tests/test-help.t Fri Jul 07 00:12:44 2017 -0700 @@ -660,6 +660,28 @@ (use 'hg help' for the full list of commands or 'hg -v' for details) [255] +Typoed command gives suggestion + $ hg puls + hg: unknown command 'puls' + (did you mean one of pull, push?) + [255] + +Not enabled extension gets suggested + + $ hg rebase + hg: unknown command 'rebase' + 'rebase' is provided by the following extension: + + rebase command to move sets of revisions to a different ancestor + + (use 'hg help extensions' for information on enabling extensions) + [255] + +Disabled extension gets suggested + $ hg --config extensions.rebase=! rebase + hg: unknown command 'rebase' + (did you mean one of rename, resolve?) + [255] Make sure that we don't run afoul of the help system thinking that this is a section and erroring out weirdly.