Skip to content

Commit a22af53

Browse files
committed
Merge branch 'tc/t0450-harden' into seen
Test updates. * tc/t0450-harden: fixup! t0450: add allowlist for builtins with missing .adoc t0450: add allowlist for builtins with missing .adoc t0450: fix test for out-of-tree builds
2 parents c5ab5e5 + ded9ea9 commit a22af53

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

t/t0450-txt-doc-vs-help.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ help_to_synopsis () {
4141
}
4242

4343
builtin_to_adoc () {
44-
echo "$GIT_BUILD_DIR/Documentation/git-$1.adoc"
44+
echo "$GIT_SOURCE_DIR/Documentation/git-$1.adoc"
4545
}
4646

4747
adoc_to_synopsis () {
@@ -112,10 +112,19 @@ do
112112
adoc="$(builtin_to_adoc "$builtin")" &&
113113
preq="$(echo BUILTIN_ADOC_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
114114

115-
if test -f "$adoc"
115+
# If and only if *.adoc is missing, builtin shall be listed in t0450/adoc-missing.
116+
if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing
116117
then
118+
test_expect_success "$builtin appropriately marked as not having .adoc" '
119+
! test -f "$adoc"
120+
'
121+
else
117122
test_set_prereq "$preq"
118-
fi &&
123+
124+
test_expect_success "$builtin appropriately marked as having .adoc" '
125+
test -f "$adoc"
126+
'
127+
fi
119128

120129
# *.adoc output assertions
121130
test_expect_success "$preq" "$builtin *.adoc SYNOPSIS has dashed labels" '

t/t0450/adoc-missing

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
checkout--worker
2+
merge-ours
3+
merge-recursive
4+
merge-recursive-ours
5+
merge-recursive-theirs
6+
merge-subtree
7+
pickaxe
8+
submodule--helper
9+
upload-archive--writer

0 commit comments

Comments
 (0)