diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-07-27 19:48:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-30 20:18:41 +0200 |
commit | d3c6751b18170276f80e3578d16877d43ad22709 (patch) | |
tree | 6fbc19983489ba653109c8bee1b47d95254e7027 /t/t6060-merge-index.sh | |
parent | Fourth batch for 2.19 cycle (diff) | |
download | git-d3c6751b18170276f80e3578d16877d43ad22709.tar.xz git-d3c6751b18170276f80e3578d16877d43ad22709.zip |
tests: make use of the test_must_be_empty function
Change various tests that use an idiom of the form:
>expect &&
test_cmp expect actual
To instead use:
test_must_be_empty actual
The test_must_be_empty() wrapper was introduced in ca8d148daf ("test:
test_must_be_empty helper", 2013-06-09). Many of these tests have been
added after that time. This was mostly found with, and manually pruned
from:
git grep '^\s+>.*expect.* &&$' t
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6060-merge-index.sh')
-rwxr-xr-x | t/t6060-merge-index.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t6060-merge-index.sh b/t/t6060-merge-index.sh index debadbd299..ddf34f0115 100755 --- a/t/t6060-merge-index.sh +++ b/t/t6060-merge-index.sh @@ -44,8 +44,7 @@ test_expect_success 'read-tree does not resolve content merge' ' test_expect_success 'git merge-index git-merge-one-file resolves' ' git merge-index git-merge-one-file -a && git diff-files --name-only --diff-filter=U >unmerged && - >expect && - test_cmp expect unmerged && + test_must_be_empty unmerged && test_cmp expect-merged file && git cat-file blob :file >file-index && test_cmp expect-merged file-index |