diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-20 11:33:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-20 11:33:48 -0700 |
commit | 14677d25ab50efcf57621ae69d6ba858a5f86165 (patch) | |
tree | c480f4a1ac902ab01d430b00e3dfbd2093b30d7a /t/t4015-diff-whitespace.sh | |
parent | Merge branch 'ab/newhash-is-sha256' (diff) | |
parent | tests: make use of the test_must_be_empty function (diff) | |
download | tgif-14677d25ab50efcf57621ae69d6ba858a5f86165.tar.xz |
Merge branch 'ab/test-must-be-empty-for-master'
Test updates.
* ab/test-must-be-empty-for-master:
tests: make use of the test_must_be_empty function
Diffstat (limited to 't/t4015-diff-whitespace.sh')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index e2dc1895ba..35fc8b5c2a 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -93,21 +93,20 @@ test_expect_success 'another test, without options' ' git diff >out && test_cmp expect out && - >expect && git diff -w >out && - test_cmp expect out && + test_must_be_empty out && git diff -w -b >out && - test_cmp expect out && + test_must_be_empty out && git diff -w --ignore-space-at-eol >out && - test_cmp expect out && + test_must_be_empty out && git diff -w -b --ignore-space-at-eol >out && - test_cmp expect out && + test_must_be_empty out && git diff -w --ignore-cr-at-eol >out && - test_cmp expect out && + test_must_be_empty out && tr "Q_" "\015 " <<-\EOF >expect && diff --git a/x b/x @@ -182,8 +181,7 @@ test_expect_success 'ignore-blank-lines: only new lines' ' test_seq 5 | sed "/3/i\\ " >x && git diff --ignore-blank-lines >out && - >expect && - test_cmp expect out + test_must_be_empty out ' test_expect_success 'ignore-blank-lines: only new lines with space' ' @@ -192,8 +190,7 @@ test_expect_success 'ignore-blank-lines: only new lines with space' ' test_seq 5 | sed "/3/i\\ " >x && git diff -w --ignore-blank-lines >out && - >expect && - test_cmp expect out + test_must_be_empty out ' test_expect_success 'ignore-blank-lines: after change' ' |