aboutsummaryrefslogtreecommitdiff
path: root/t/t0030-stripspace.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-01-07 12:49:19 -0800
committerJunio C Hamano <gitster@pobox.com>2015-01-07 12:49:19 -0800
commit58e0362eddba1678a71c8990862053ff989527b6 (patch)
tree3d3a41a516dc7cc1343c5f71f212eb79f1662632 /t/t0030-stripspace.sh
parentf41157e649615ada01f175d00f9bd8c9ea507bca (diff)
parentd55aeb7687448189327ad058096b55431da5ea42 (diff)
downloadgit-58e0362eddba1678a71c8990862053ff989527b6.tar.gz
git-58e0362eddba1678a71c8990862053ff989527b6.tar.xz
Merge branch 'jc/strbuf-add-lines-avoid-sp-ht-sequence'
The commented output used to blindly add a SP before the payload line, resulting in "# \t<indented text>\n" when the payload began with a HT. Instead, produce "#\t<indented text>\n". * jc/strbuf-add-lines-avoid-sp-ht-sequence: strbuf_add_commented_lines(): avoid SP-HT sequence in commented lines
Diffstat (limited to 't/t0030-stripspace.sh')
-rwxr-xr-xt/t0030-stripspace.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index 0333dd987..29e91d861 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -432,4 +432,10 @@ test_expect_success '-c with changed comment char' '
test_cmp expect actual
'
+test_expect_success 'avoid SP-HT sequence in commented line' '
+ printf "#\tone\n#\n# two\n" >expect &&
+ printf "\tone\n\ntwo\n" | git stripspace -c >actual &&
+ test_cmp expect actual
+'
+
test_done