]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pretty format %(trailers) test: split a long line
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 6 Dec 2020 00:24:45 +0000 (01:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Dec 2020 18:23:11 +0000 (10:23 -0800)
Split a very long line in a test introduced in 0b691d86851 (pretty:
add support for separator option in %(trailers), 2019-01-28). This
makes it easier to read, especially as follow-up commits will copy
this test as a template.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4205-log-pretty-formats.sh

index 204c149d5a495960d7dd4329f9bef0d3770cf0fa..5e5452212d2dfd7387817fac768a3f4d7ff0defd 100755 (executable)
@@ -717,7 +717,12 @@ test_expect_success '%(trailers:key=foo,valueonly) shows only value' '
 
 test_expect_success 'pretty format %(trailers:separator) changes separator' '
        git log --no-walk --pretty=format:"X%(trailers:separator=%x00,unfold)X" >actual &&
-       printf "XSigned-off-by: A U Thor <author@example.com>\0Acked-by: A U Thor <author@example.com>\0[ v2 updated patch description ]\0Signed-off-by: A U Thor <author@example.com>X" >expect &&
+       (
+               printf "XSigned-off-by: A U Thor <author@example.com>\0" &&
+               printf "Acked-by: A U Thor <author@example.com>\0" &&
+               printf "[ v2 updated patch description ]\0" &&
+               printf "Signed-off-by: A U Thor <author@example.com>X"
+       ) >expect &&
        test_cmp expect actual
 '