aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-12 10:41:21 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-12 10:41:21 -0700
commitf67058f0fa555a2c0b4e6e7e1466c4ab3dbbb6f8 (patch)
treeec88240eb5174714e341178029edf11ebfeba561
parent4097eac99cc59ec55b3a8e7cb1862e5ba6d49595 (diff)
parentf9a6705d9a1012bc5349a9f010fee3abbf8c53e6 (diff)
downloadgit-f67058f0fa555a2c0b4e6e7e1466c4ab3dbbb6f8.tar.xz
Merge branch 'tc/t0450-harden'
Test updates. * tc/t0450-harden: t0450: add allowlist for builtins with missing .adoc t0450: fix test for out-of-tree builds
-rwxr-xr-xt/t0450-txt-doc-vs-help.sh15
-rw-r--r--t/t0450/adoc-missing9
2 files changed, 21 insertions, 3 deletions
diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
index 2f7504ae7e..e12e18f97f 100755
--- a/t/t0450-txt-doc-vs-help.sh
+++ b/t/t0450-txt-doc-vs-help.sh
@@ -41,7 +41,7 @@ help_to_synopsis () {
}
builtin_to_adoc () {
- echo "$GIT_BUILD_DIR/Documentation/git-$1.adoc"
+ echo "$GIT_SOURCE_DIR/Documentation/git-$1.adoc"
}
adoc_to_synopsis () {
@@ -112,10 +112,19 @@ do
adoc="$(builtin_to_adoc "$builtin")" &&
preq="$(echo BUILTIN_ADOC_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
- if test -f "$adoc"
+ # If and only if *.adoc is missing, builtin shall be listed in t0450/adoc-missing.
+ if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing
then
+ test_expect_success "$builtin appropriately marked as not having .adoc" '
+ ! test -f "$adoc"
+ '
+ else
test_set_prereq "$preq"
- fi &&
+
+ test_expect_success "$builtin appropriately marked as having .adoc" '
+ test -f "$adoc"
+ '
+ fi
# *.adoc output assertions
test_expect_success "$preq" "$builtin *.adoc SYNOPSIS has dashed labels" '
diff --git a/t/t0450/adoc-missing b/t/t0450/adoc-missing
new file mode 100644
index 0000000000..1ec9f8dcf3
--- /dev/null
+++ b/t/t0450/adoc-missing
@@ -0,0 +1,9 @@
+checkout--worker
+merge-ours
+merge-recursive
+merge-recursive-ours
+merge-recursive-theirs
+merge-subtree
+pickaxe
+submodule--helper
+upload-archive--writer