diff mbox series

[v2,03/11] t6422: fix bad check against missing file

Message ID 7f408b7d4069403b969d334f4940ebf87f1dc797.1596906081.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Start preparing merge-related tests to work with multiple merge backends | expand

Commit Message

Derrick Stolee via GitGitGadget Aug. 8, 2020, 5:01 p.m. UTC
From: Elijah Newren <newren@gmail.com>

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 t/t6422-merge-rename-corner-cases.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Eric Sunshine Aug. 9, 2020, 2:30 a.m. UTC | #1
On Sat, Aug 8, 2020 at 1:02 PM Elijah Newren via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
> diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
> @@ -974,8 +974,8 @@ test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' '
> -               test_cmp file_is_missing foo &&
> -               test_cmp file_is_missing bar &&
> +               test_path_is_missing foo &&
> +               test_path_is_missing bar &&

These errors in the tests went unnoticed because they are inside
test_expect_failure(), which makes one wonder if test_cmp() should be
updated to throw a hard error to help diagnose this sort of problem
sooner. (Then again, that might be overkill since there are relatively
few test_expect_failures() around, so it may not buy us much. On the
other hand, every little bit helps.)
diff mbox series

Patch

diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh
index f163893ff9..7da75c1736 100755
--- a/t/t6422-merge-rename-corner-cases.sh
+++ b/t/t6422-merge-rename-corner-cases.sh
@@ -906,7 +906,7 @@  test_expect_failure 'rad-check: rename/add/delete conflict' '
 		git rev-parse >expect \
 			B:bar  A:bar  &&
 
-		test_cmp file_is_missing foo &&
+		test_path_is_missing foo &&
 		# bar should have two-way merged contents of the different
 		# versions of bar; check that content from both sides is
 		# present.
@@ -974,8 +974,8 @@  test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' '
 		git rev-parse >expect \
 			O:foo  O:bar  &&
 
-		test_cmp file_is_missing foo &&
-		test_cmp file_is_missing bar &&
+		test_path_is_missing foo &&
+		test_path_is_missing bar &&
 		# baz should have two-way merged contents of the original
 		# contents of foo and bar; check that content from both sides
 		# is present.