]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0012-help.sh
help: make sure local html page exists before calling external processes
[thirdparty/git.git] / t / t0012-help.sh
index 5679e29c62479c663446e76fbc587a2648efe601..913f34c8e9df2d4b4dd5e301d0774907b39b068e 100755 (executable)
@@ -73,6 +73,22 @@ test_expect_success 'git help -g' '
        test_i18ngrep "^   tutorial   " help.output
 '
 
+test_expect_success 'git help fails for non-existing html pages' '
+       configure_help &&
+       mkdir html-empty &&
+       test_must_fail git -c help.htmlpath=html-empty help status &&
+       test_must_be_empty test-browser.log
+'
+
+test_expect_success 'git help succeeds without git.html' '
+       configure_help &&
+       mkdir html-with-docs &&
+       touch html-with-docs/git-status.html &&
+       git -c help.htmlpath=html-with-docs help status &&
+       echo "html-with-docs/git-status.html" >expect &&
+       test_cmp expect test-browser.log
+'
+
 test_expect_success 'generate builtin list' '
        git --list-cmds=builtins >builtins
 '