diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-27 14:33:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-27 14:33:43 -0700 |
commit | 986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a (patch) | |
tree | 4ef3f9805cfdbf3b4496cb720a94c138df034204 /t/t4060-diff-submodule-option-diff-format.sh | |
parent | Merge branch 'rs/opt-updates' (diff) | |
parent | tests: use 'test_must_be_empty' instead of 'test_cmp <empty> <out>' (diff) | |
download | tgif-986c5181071ce3aac42d0aaeb7bd691a1a0bdf4a.tar.xz |
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/t4060-diff-submodule-option-diff-format.sh')
-rwxr-xr-x | t/t4060-diff-submodule-option-diff-format.sh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh index 0eba4620f0..9dcb69df5c 100755 --- a/t/t4060-diff-submodule-option-diff-format.sh +++ b/t/t4060-diff-submodule-option-diff-format.sh @@ -392,9 +392,7 @@ test_expect_success 'typechanged submodule(blob->submodule)' ' commit_file sm1 && test_expect_success 'submodule is up to date' ' git diff-index -p --submodule=diff HEAD >actual && - cat >expected <<-EOF && - EOF - test_cmp expected actual + test_must_be_empty actual ' test_expect_success 'submodule contains untracked content' ' @@ -408,17 +406,17 @@ test_expect_success 'submodule contains untracked content' ' test_expect_success 'submodule contains untracked content (untracked ignored)' ' git diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'submodule contains untracked content (dirty ignored)' ' git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'submodule contains untracked content (all ignored)' ' git diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'submodule contains untracked and modified content' ' @@ -458,13 +456,13 @@ test_expect_success 'submodule contains untracked and modified content (untracke test_expect_success 'submodule contains untracked and modified content (dirty ignored)' ' echo new > sm1/foo6 && git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'submodule contains untracked and modified content (all ignored)' ' echo new > sm1/foo6 && git diff-index -p --ignore-submodules --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'submodule contains modified content' ' @@ -549,7 +547,7 @@ test_expect_success 'modified submodule contains untracked content (dirty ignore test_expect_success 'modified submodule contains untracked content (all ignored)' ' git diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' test_expect_success 'modified submodule contains untracked and modified content' ' @@ -609,7 +607,7 @@ test_expect_success 'modified submodule contains untracked and modified content test_expect_success 'modified submodule contains untracked and modified content (all ignored)' ' echo modification >> sm1/foo6 && git diff-index -p --ignore-submodules --submodule=diff HEAD >actual && - ! test -s actual + test_must_be_empty actual ' # NOT OK |