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
This commit is contained in:
@@ -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" '
|
||||
|
||||
9
t/t0450/adoc-missing
Normal file
9
t/t0450/adoc-missing
Normal file
@@ -0,0 +1,9 @@
|
||||
checkout--worker
|
||||
merge-ours
|
||||
merge-recursive
|
||||
merge-recursive-ours
|
||||
merge-recursive-theirs
|
||||
merge-subtree
|
||||
pickaxe
|
||||
submodule--helper
|
||||
upload-archive--writer
|
||||
Reference in New Issue
Block a user