mirror of
https://github.com/git/git.git
synced 2025-01-24 16:34:18 +08:00
t0030: Add tests with consecutive text lines and others with spaces added.
Previous tests only had paragraphs of one line. This commit adds some tests to check when many consecutive text lines are given. Also, it adds tests for checking that many lines between paragraphs are correctly reduced to one when there are tabs and spaces in those lines. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
defd53142e
commit
b61a8a6747
@ -81,6 +81,30 @@ test_expect_success \
|
||||
|
||||
printf "$ttt\n\n$ttt$ttt$ttt\n" > expect &&
|
||||
printf "$ttt\n\n\n\n\n$ttt$ttt$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n\n$ttt\n" > expect &&
|
||||
printf "$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt$ttt\n\n$ttt\n" > expect &&
|
||||
printf "$ttt$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt$ttt$ttt\n\n$ttt\n" > expect &&
|
||||
printf "$ttt$ttt$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n\n$ttt\n" > expect &&
|
||||
printf "$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n\n$ttt$ttt\n" > expect &&
|
||||
printf "$ttt\n\t\n \n\n \t\t\n$ttt$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n\n$ttt$ttt$ttt\n" > expect &&
|
||||
printf "$ttt\n\t\n \n\n \t\t\n$ttt$ttt$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual
|
||||
'
|
||||
|
||||
@ -341,4 +365,31 @@ test_expect_success \
|
||||
git diff expect actual
|
||||
'
|
||||
|
||||
test_expect_success \
|
||||
'consecutive text lines should be unchanged' '
|
||||
printf "$ttt$ttt\n$ttt\n" >expect &&
|
||||
printf "$ttt$ttt\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n$ttt$ttt\n$ttt\n" >expect &&
|
||||
printf "$ttt\n$ttt$ttt\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n$ttt\n$ttt\n$ttt$ttt\n" >expect &&
|
||||
printf "$ttt\n$ttt\n$ttt\n$ttt$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n$ttt\n\n$ttt$ttt\n$ttt\n" >expect &&
|
||||
printf "$ttt\n$ttt\n\n$ttt$ttt\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt$ttt\n\n$ttt\n$ttt$ttt\n" >expect &&
|
||||
printf "$ttt$ttt\n\n$ttt\n$ttt$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual &&
|
||||
|
||||
printf "$ttt\n$ttt$ttt\n\n$ttt\n" >expect &&
|
||||
printf "$ttt\n$ttt$ttt\n\n$ttt\n" | git stripspace >actual &&
|
||||
git diff expect actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user