diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-27 23:33:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-27 23:33:43 +0200 |
commit | 986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a (patch) | |
tree | 4ef3f9805cfdbf3b4496cb720a94c138df034204 /t/t7001-mv.sh | |
parent | Merge branch 'rs/opt-updates' (diff) | |
parent | tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>' (diff) | |
download | git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.xz git-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.zip |
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-x | t/t7001-mv.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 9e59e5a5dd..36b50d0b4c 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' ' |