tests/test-debugcomplete
author Patrick Mezard <pmezard@gmail.com>
Sat, 28 Apr 2007 11:53:36 +0200
changeset 4382 caaba589d9c7
parent 3292 399c04369a1b
permissions -rwxr-xr-x
Use patch.patch() when checking for patch availability. The test is closer to what we want to know. It also makes sense when you deal with patched versions of patch() as most people do under win32.

#!/bin/sh

echo '% Show all commands except debug commands'
hg debugcomplete

echo
echo '% Show all commands that start with "a"'
hg debugcomplete a

echo
echo '% Do not show debug commands if there are other candidates'
hg debugcomplete d

echo
echo '% Show debug commands if there are no other candidates'
hg debugcomplete debug

echo
echo '% Do not show the alias of a debug command if there are other candidates'
echo '% (this should hide rawcommit)'
hg debugcomplete r

echo
echo '% Show the alias of a debug command if there are no other candidates'
hg debugcomplete rawc

echo
echo '% Show the global options'
hg debugcomplete --options | sort

echo
echo '% Show the options for the "serve" command'
hg debugcomplete --options serve | sort

echo
echo '% Show an error if we use --options with an ambiguous abbreviation'
hg debugcomplete --options s

exit 0