summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-27 21:33:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-27 21:33:43 (GMT)
commit986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a (patch)
tree4ef3f9805cfdbf3b4496cb720a94c138df034204 /t/t7001-mv.sh
parentfc0df933c8fa09603a9e9798085ee07ca1a83f65 (diff)
parent1c5e94f459a0b7c23ef7e855441a65afdc4effab (diff)
downloadgit-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.zip
git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.gz
git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.bz2
Merge branch 'sg/test-must-be-empty'
Test fixes. * sg/test-must-be-empty: tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>' tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>' tests: use 'test_must_be_empty' instead of 'test ! -s' tests: use 'test_must_be_empty' instead of '! test -s'
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 9e59e5a..36b50d0 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -384,7 +384,7 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
entry="$(git ls-files --stage sub | cut -f 1)" &&
mkdir mod &&
git mv sub mod/sub 2>actual.err &&
- ! test -s actual.err &&
+ test_must_be_empty actual.err &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
@@ -408,7 +408,7 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
git diff-files --quiet -- sub &&
git add .gitmodules &&
git mv sub mod/sub 2>actual.err &&
- ! test -s actual.err &&
+ test_must_be_empty actual.err &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
@@ -469,7 +469,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
git update-index --refresh &&
git diff-files --quiet -- sub .gitmodules &&
git status -s sub2 >actual &&
- ! test -s actual
+ test_must_be_empty actual
'
test_expect_success 'mv -k does not accidentally destroy submodules' '