summaryrefslogtreecommitdiff
path: root/t/t7513-interpret-trailers.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2014-11-09 09:23:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-10 18:00:07 (GMT)
commit3d24a7267dd9b57b864d119a533bdfdfaccd9161 (patch)
tree41f857223bc07e3333aea0481d3477b1192f48f9 /t/t7513-interpret-trailers.sh
parent61cfef4ca4bdacbb90866fa8fd0e0f0b16b2cafc (diff)
downloadgit-3d24a7267dd9b57b864d119a533bdfdfaccd9161.zip
git-3d24a7267dd9b57b864d119a533bdfdfaccd9161.tar.gz
git-3d24a7267dd9b57b864d119a533bdfdfaccd9161.tar.bz2
trailer: add test with an old style conflict block
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7513-interpret-trailers.sh')
-rwxr-xr-xt/t7513-interpret-trailers.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh
index fed053a..bd0ab46 100755
--- a/t/t7513-interpret-trailers.sh
+++ b/t/t7513-interpret-trailers.sh
@@ -213,7 +213,7 @@ test_expect_success 'with 2 files arguments' '
'
test_expect_success 'with message that has comments' '
- cat basic_message >>message_with_comments &&
+ cat basic_message >message_with_comments &&
sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
# comment
@@ -240,6 +240,36 @@ test_expect_success 'with message that has comments' '
test_cmp expected actual
'
+test_expect_success 'with message that has an old style conflict block' '
+ cat basic_message >message_with_comments &&
+ sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
+ # comment
+
+ # other comment
+ Cc: Z
+ # yet another comment
+ Reviewed-by: Johan
+ Reviewed-by: Z
+ # last comment
+
+ Conflicts:
+
+ EOF
+ cat basic_message >expected &&
+ cat >>expected <<-\EOF &&
+ # comment
+
+ Reviewed-by: Johan
+ Cc: Peff
+ # last comment
+
+ Conflicts:
+
+ EOF
+ git interpret-trailers --trim-empty --trailer "Cc: Peff" message_with_comments >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'with commit complex message and trailer args' '
cat complex_message_body >expected &&
sed -e "s/ Z\$/ /" >>expected <<-\EOF &&