summaryrefslogtreecommitdiff
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-06-16 15:32:57 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-18 09:50:14 -0700
commitb3c32ead20bc4d3baa6cffe00dd862f069463869 (patch)
treed52f299c4c5f299f62af232fee0d3ec19d437067 /t/t4150-am.sh
parent4f4fa9c228a1ac2854c0814b5b23df43b8d98203 (diff)
downloadgit-b3c32ead20bc4d3baa6cffe00dd862f069463869.tar.gz
t4150: test applying with a newline in subject
Commit 4b7cc26 (git-am: use printf instead of echo on user-supplied strings, 2007-05-25) fixed a bug where subjects with newlines would cause git-am to echo multiple lines when it says "Applying: <subject>". This test ensures that fix stays valid. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-xt/t4150-am.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index d6ebbaebe2..51c369ad14 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -305,4 +305,12 @@ test_expect_success 'am into an unborn branch' '
test "z$result" = "z$(git rev-parse first^{tree})"
'
+test_expect_success 'am newline in subject' '
+ git checkout first &&
+ test_tick &&
+ sed -e "s/second/second \\\n foo/" patch1 > patchnl &&
+ git am < patchnl > output.out 2>&1 &&
+ grep "^Applying: second \\\n foo$" output.out
+'
+
test_done