t0450: use test_path_is_file and test_path_is_missing
PATCH 1/1 t0450: use test_path_is_file and test_path_is_missing
Replace raw 'test -f' and '! test -f' assertions with the test helper functions 'test_path_is_file' and 'test_path_is_missing' to provide diagnostic output when an assertion fails.
Signed-off-by Muhammed Dilshad A <[email protected]>
--- t/t0450-txt-doc-vs-help.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
t/t0450-txt-doc-vs-help.sh +2 -2
@@ -116,13 +116,13 @@ do if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing then test_expect_success "$builtin appropriately marked as not having .adoc" ' - ! test -f "$adoc" + test_path_is_missing "$adoc" ' else test_set_prereq "$preq" test_expect_success "$builtin appropriately marked as having .adoc" ' - test -f "$adoc" + test_path_is_file "$adoc" ' fi
Signature · 1 line
2.55.0
Quoted 5 lines · Muhammed Dilshad A
Replace raw 'test -f' and '! test -f' assertions with the test helper functions '
test_path_is_file' and 'test_path_is_missing' to provide diagnostic output when an assertion fails.Signed-off-by Muhammed Dilshad A <[email protected]>
Good commit message, pinpointing exactly why we even bother to do this change.
Quoted 9 lines
t/t0450-txt-doc-vs-help.sh +0
-1@@ -116,13 +116,13 @@ do if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing then test_expect_success "$builtin appropriately marked as not having .adoc" ' - ! test -f "$adoc"
t/t0450-txt-doc-vs-help.sh do · line 127
Quoted 10 lines
t/t0450-txt-doc-vs-help.sh +2
-1+ test_path_is_missing "$adoc" ' else test_set_prereq "$preq" test_expect_success "$builtin appropriately marked as having .adoc" ' - test -f "$adoc" + test_path_is_file "$adoc" ' fi
And the change looks obviously good to me, as well. Thanks!
Patrick