{"thread":{"id":"8972","subject":"[PATCH 2/2] t0030: Add tests with consecutive text lines and others with spaces added.","startedAt":"2007-07-10T21:59:43Z","lastAt":"2007-07-10T21:59:43Z","messageCount":1,"participants":["Carlos Rica"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"46986","messageId":"4694014F.7040606@gmail.com","threadId":"8972","inReplyTo":null,"subject":"[PATCH 2/2] t0030: Add tests with consecutive text lines and others with spaces added.","fromName":"Carlos Rica","fromEmail":"jasampler@gmail.com","sentAt":"2007-07-10T21:59:43Z","receivedAt":"2007-07-10T21:59:43Z","isPatch":true,"sender":{"key":"jasampler@gmail.com","avatar":null},"body":"Previous tests only had paragraphs of one line. This commit adds some\ntests to check when many consecutive text lines are given.\n\nAlso, it adds tests for checking that many lines between paragraphs are\ncorrectly reduced to one when there are tabs and spaces in those lines.\n\nSigned-off-by: Carlos Rica <jasampler@gmail.com>\n---\n\n   These were used in the development of the new in-place version\n   of the stripspace function, which acts on a buffer instead\n   on file descriptors. The first version I wrote passed the\n   previous tests but it was completely broken in these cases.\n\n t/t0030-stripspace.sh |   51 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 51 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh\nindex 4a2980c..b1c9003 100755\n--- a/t/t0030-stripspace.sh\n+++ b/t/t0030-stripspace.sh\n@@ -81,6 +81,30 @@ test_expect_success \\\n\n     printf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n     printf \"$ttt\\n\\n\\n\\n\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+    printf \"$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt$ttt$ttt\\n\\n$ttt\\n\" > expect &&\n+    printf \"$ttt$ttt$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n\\n$ttt\\n\" > expect &&\n+    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n\\n$ttt$ttt\\n\" > expect &&\n+    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n\\n$ttt$ttt$ttt\\n\" > expect &&\n+    printf \"$ttt\\n\\t\\n \\n\\n  \\t\\t\\n$ttt$ttt$ttt\\n\" | git stripspace >actual &&\n     git diff expect actual\n '\n\n@@ -341,4 +365,31 @@ test_expect_success \\\n     git diff expect actual\n '\n\n+test_expect_success \\\n+    'consecutive text lines should be unchanged' '\n+    printf \"$ttt$ttt\\n$ttt\\n\" >expect &&\n+    printf \"$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n+    printf \"$ttt\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n+    printf \"$ttt\\n$ttt\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" >expect &&\n+    printf \"$ttt\\n$ttt\\n\\n$ttt$ttt\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" >expect &&\n+    printf \"$ttt$ttt\\n\\n$ttt\\n$ttt$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual &&\n+\n+    printf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" >expect &&\n+    printf \"$ttt\\n$ttt$ttt\\n\\n$ttt\\n\" | git stripspace >actual &&\n+    git diff expect actual\n+'\n+\n test_done\n-- \n1.5.0\n"}]}