summaryrefslogtreecommitdiff
path: root/t/t0012-help.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-10 08:46:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-10 10:52:47 (GMT)
commitcfb22a02ab52a5e8b74139efad8e0a10bd95f149 (patch)
tree257b1a0491c8886a1ea2210db9b350d8bf8028ee /t/t0012-help.sh
parentf318d7391592f153d1682d01ebaa2d35e3b6ede7 (diff)
downloadgit-cfb22a02ab52a5e8b74139efad8e0a10bd95f149.zip
git-cfb22a02ab52a5e8b74139efad8e0a10bd95f149.tar.gz
git-cfb22a02ab52a5e8b74139efad8e0a10bd95f149.tar.bz2
help: use command-list.h for common command list
The previous commit added code generation for all_cmd_desc[] which includes almost everything we need to generate common command list. Convert help code to use that array instead and drop common_cmds[] array. The description of each common command group is removed from command-list.txt. This keeps this file format simpler. common-cmds.h will not be generated correctly after this change due to the command-list.txt format change. But it does not matter and common-cmds.h will be removed. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0012-help.sh')
-rwxr-xr-xt/t0012-help.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0012-help.sh b/t/t0012-help.sh
index 487b92a..c096f33 100755
--- a/t/t0012-help.sh
+++ b/t/t0012-help.sh
@@ -49,6 +49,15 @@ test_expect_success "--help does not work for guides" "
test_i18ncmp expect actual
"
+test_expect_success 'git help' '
+ git help >help.output &&
+ test_i18ngrep "^ clone " help.output &&
+ test_i18ngrep "^ add " help.output &&
+ test_i18ngrep "^ log " help.output &&
+ test_i18ngrep "^ commit " help.output &&
+ test_i18ngrep "^ fetch " help.output
+'
+
test_expect_success 'generate builtin list' '
git --list-builtins >builtins
'