diff options
Diffstat (limited to 't/t0030-stripspace.sh')
-rwxr-xr-x | t/t0030-stripspace.sh | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh index bbf3e39e3d..5ce47e8af5 100755 --- a/t/t0030-stripspace.sh +++ b/t/t0030-stripspace.sh @@ -110,31 +110,30 @@ test_expect_success \ test_expect_success \ 'only consecutive blank lines should be completely removed' ' - > expect && printf "\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "\n\n\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss\n$sss\n$sss\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss$sss\n$sss\n\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "\n$sss\n$sss$sss\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss$sss$sss$sss\n\n\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "\n$sss$sss$sss$sss\n\n" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "\n\n$sss$sss$sss$sss\n" | git stripspace >actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success \ @@ -321,22 +320,20 @@ test_expect_success \ test_expect_success \ 'spaces with newline at end should be replaced with empty string' ' - printf "" >expect && - echo | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && echo "$sss" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && echo "$sss$sss" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && echo "$sss$sss$sss" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && echo "$sss$sss$sss$sss" | git stripspace >actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success \ @@ -350,19 +347,17 @@ test_expect_success \ test_expect_success \ 'spaces without newline at end should be replaced with empty string' ' - printf "" >expect && - printf "" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss$sss" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss$sss$sss" | git stripspace >actual && - test_cmp expect actual && + test_must_be_empty actual && printf "$sss$sss$sss$sss" | git stripspace >actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success \ |