From b9e1150985b928a0f225d26a05bb5d25d6f57d05 Mon Sep 17 00:00:00 2001 From: Lessley Dennington Date: Sun, 26 Sep 2021 22:12:29 -0700 Subject: [PATCH] fixup! t1092: test interesting sparse-checkout scenarios Making the 'blame with pathspec outside sparse definition' test more robust. Previously, this test just looked for a generic "failure" and didn't verify that sparse index and non-sparse index provide the same error. We now fail only when the error messages from sparse index and non-sparse index don't match (and still document the behavior in the test). --- t/t1092-sparse-checkout-compatibility.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh index ae72a7c86b5989..14d9aa02cc7f59 100755 --- a/t/t1092-sparse-checkout-compatibility.sh +++ b/t/t1092-sparse-checkout-compatibility.sh @@ -488,13 +488,14 @@ test_expect_success 'blame with pathspec inside sparse definition' ' # TODO: blame currently does not support blaming files outside of the # sparse definition. It complains that the file doesn't exist locally. -test_expect_failure 'blame with pathspec outside sparse definition' ' +test_expect_success 'blame with pathspec outside sparse definition' ' init_repos && - test_all_match git blame folder1/a && - test_all_match git blame folder2/a && - test_all_match git blame deep/deeper2/a && - test_all_match git blame deep/deeper2/deepest/a + test_sparse_match git sparse-checkout set && + test_sparse_match test_must_fail git blame folder1/a && + test_sparse_match test_must_fail git blame folder2/a && + test_sparse_match test_must_fail git blame deep/deeper2/a && + test_sparse_match test_must_fail git blame deep/deeper2/deepest/a ' # TODO: This behaves correctly in microsoft/git. Why?