summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 36d56de)
raw | patch | inline | side by side (parent: 36d56de)
author | Carlos Rica <jasampler@gmail.com> | |
Tue, 10 Jul 2007 21:53:45 +0000 (23:53 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 Jul 2007 22:02:05 +0000 (15:02 -0700) |
Moved some tests to another test_expect_success block.
Many tests now reuse the same "expect" file. Also replacing
many printf "" >expect with one >expect instruction.
Added missing && which concatenated tests in some
test_expect_success blocks.
Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Many tests now reuse the same "expect" file. Also replacing
many printf "" >expect with one >expect instruction.
Added missing && which concatenated tests in some
test_expect_success blocks.
Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0030-stripspace.sh | patch | blob | history |
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index fdc9fdce6fd334205d991d0a43161a8678c45962..4a2980c8333e99486de839d72c67005bf58fe304 100755 (executable)
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
'
test_expect_success \
- 'consecutive blank lines at the beginning should be removed' '
- printf "" > expect &&
+ 'only consecutive blank lines should be completely removed' '
+ > expect &&
+
printf "\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "\n\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "$sss\n$sss\n$sss\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "$sss$sss\n$sss\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "\n$sss\n$sss$sss\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "$sss$sss$sss$sss\n\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "\n$sss$sss$sss$sss\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "" > expect &&
printf "\n\n$sss$sss$sss$sss\n" | git stripspace >actual &&
- git diff expect actual &&
+ git diff expect actual
+'
+test_expect_success \
+ 'consecutive blank lines at the beginning should be removed' '
printf "$ttt\n" > expect &&
printf "\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
git diff expect actual &&
printf "$ttt\n" > expect &&
+
printf "$sss\n$sss\n$sss\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "\n$sss\n$sss$sss\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$sss$sss\n$sss\n\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$sss$sss$sss\n\n\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "\n$sss$sss$sss\n\n$ttt\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "\n\n$sss$sss$sss\n$ttt\n" | git stripspace >actual &&
git diff expect actual
'
git diff expect actual &&
printf "$ttt\n" > expect &&
+
printf "$ttt\n$sss\n$sss\n$sss\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$ttt\n\n$sss\n$sss$sss\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$ttt\n$sss$sss\n$sss\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$ttt\n$sss$sss$sss\n\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$ttt\n\n$sss$sss$sss\n\n" | git stripspace >actual &&
git diff expect actual &&
- printf "$ttt\n" > expect &&
printf "$ttt\n\n\n$sss$sss$sss\n" | git stripspace >actual &&
git diff expect actual
'
'text plus spaces without newline at end should end with newline' '
test `printf "$ttt$sss" | git stripspace | wc -l` -gt 0 &&
test `printf "$ttt$ttt$sss" | git stripspace | wc -l` -gt 0 &&
- test `printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l` -gt 0
+ test `printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l` -gt 0 &&
test `printf "$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
test `printf "$ttt$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
test `printf "$ttt$sss$sss$sss" | git stripspace | wc -l` -gt 0
printf "" >expect &&
printf "" | git stripspace >actual &&
- git diff expect actual
+ git diff expect actual &&
printf "$sss$sss" | git stripspace >actual &&
- git diff expect actual
+ git diff expect actual &&
printf "$sss$sss$sss" | git stripspace >actual &&
- git diff expect actual
+ git diff expect actual &&
printf "$sss$sss$sss$sss" | git stripspace >actual &&
git diff expect actual