summaryrefslogtreecommitdiff
path: root/t/t3310-notes-merge-manual-resolve.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-08-19 21:57:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-21 18:48:34 (GMT)
commitec21ac8c189537df815e49bdf8f08da927665cf2 (patch)
tree36c09e7ca122410c6418b5b58ded1e330460280b /t/t3310-notes-merge-manual-resolve.sh
parentf0dc593a95877298ba6fa9d29e5c779832ad5894 (diff)
downloadgit-ec21ac8c189537df815e49bdf8f08da927665cf2.zip
git-ec21ac8c189537df815e49bdf8f08da927665cf2.tar.gz
git-ec21ac8c189537df815e49bdf8f08da927665cf2.tar.bz2
tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>'
Using 'test_must_be_empty' is more idiomatic than 'test_cmp /dev/null out', and its message on error is perhaps a bit more to the point. This patch was basically created by running: sed -i -e 's%test_cmp /dev/null%test_must_be_empty%' t[0-9]*.sh with the exception of the change in 'should not fail in an empty repo' in 't7401-submodule-summary.sh', where it was 'test_cmp output /dev/null'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3310-notes-merge-manual-resolve.sh')
-rwxr-xr-xt/t3310-notes-merge-manual-resolve.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh
index 9c1bf6e..a1cf4ec 100755
--- a/t/t3310-notes-merge-manual-resolve.sh
+++ b/t/t3310-notes-merge-manual-resolve.sh
@@ -337,7 +337,7 @@ EOF
git notes merge --commit &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
- test_cmp /dev/null output &&
+ test_must_be_empty output &&
# Merge commit has pre-merge y and pre-merge z as parents
test "$(git rev-parse refs/notes/m^1)" = "$(cat pre_merge_y)" &&
test "$(git rev-parse refs/notes/m^2)" = "$(cat pre_merge_z)" &&
@@ -399,7 +399,7 @@ test_expect_success 'abort notes merge' '
git notes merge --abort &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
- test_cmp /dev/null output &&
+ test_must_be_empty output &&
# m has not moved (still == y)
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)" &&
# Verify that other notes refs has not changed (w, x, y and z)
@@ -466,7 +466,7 @@ EOF
git notes merge --commit &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
- test_cmp /dev/null output &&
+ test_must_be_empty output &&
# Merge commit has pre-merge y and pre-merge z as parents
test "$(git rev-parse refs/notes/m^1)" = "$(cat pre_merge_y)" &&
test "$(git rev-parse refs/notes/m^2)" = "$(cat pre_merge_z)" &&
@@ -555,7 +555,7 @@ test_expect_success 'resolve situation by aborting the notes merge' '
git notes merge --abort &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
- test_cmp /dev/null output &&
+ test_must_be_empty output &&
# m has not moved (still == w)
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)" &&
# Verify that other notes refs has not changed (w, x, y and z)