]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0012-help.sh
Merge branch 'mk/doc-gitfile-more' into maint-2.43
[thirdparty/git.git] / t / t0012-help.sh
index 6c3e1f7159d4dcc6a2e61228fa7c4f3cec42ef3b..1d273d91c2125ae2c16ae1a14c628cf23fcecc06 100755 (executable)
@@ -44,6 +44,8 @@ test_expect_success 'invalid usage' '
        test_expect_code 129 git help -g add &&
        test_expect_code 129 git help -a -g &&
 
+       test_expect_code 129 git help --user-interfaces add &&
+
        test_expect_code 129 git help -g -c &&
        test_expect_code 129 git help --config-for-completion add &&
        test_expect_code 129 git help --config-sections-for-completion add
@@ -98,17 +100,17 @@ test_expect_success "--help does not work for guides" "
 
 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_grep "^   clone  " help.output &&
+       test_grep "^   add    " help.output &&
+       test_grep "^   log    " help.output &&
+       test_grep "^   commit " help.output &&
+       test_grep "^   fetch  " help.output
 '
+
 test_expect_success 'git help -g' '
        git help -g >help.output &&
-       test_i18ngrep "^   attributes " help.output &&
-       test_i18ngrep "^   everyday   " help.output &&
-       test_i18ngrep "^   tutorial   " help.output
+       test_grep "^   everyday   " help.output &&
+       test_grep "^   tutorial   " help.output
 '
 
 test_expect_success 'git help fails for non-existing html pages' '
@@ -127,6 +129,12 @@ test_expect_success 'git help succeeds without git.html' '
        test_cmp expect test-browser.log
 '
 
+test_expect_success 'git help --user-interfaces' '
+       git help --user-interfaces >help.output &&
+       grep "^   attributes   " help.output &&
+       grep "^   mailmap   " help.output
+'
+
 test_expect_success 'git help -c' '
        git help -c >help.output &&
        cat >expect <<-\EOF &&
@@ -181,7 +189,7 @@ for cmd in git "git help"
 do
        test_expect_success "'$cmd' section spacing" '
                test_section_spacing_trailer git help <<-\EOF &&
-               usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
+               usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
 
                These are common Git commands used in various situations:
 
@@ -220,6 +228,10 @@ test_expect_success "'git help -a' section spacing" '
        Low-level Commands / Syncing Repositories
 
        Low-level Commands / Internal Helpers
+
+       User-facing repository, command and file interfaces
+
+       Developer-facing file formats, protocols and other interfaces
        EOF
        test_cmp expect actual
 '
@@ -245,7 +257,7 @@ do
                        export GIT_CEILING_DIRECTORIES &&
                        test_expect_code 129 git -C sub $builtin -h >output 2>&1
                ) &&
-               test_i18ngrep usage output
+               test_grep usage output
        '
 done <builtins