diff options
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-x | t/t6006-rev-list-format.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index 9b77073df8..d918cc02d0 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -162,6 +162,14 @@ commit 131a310eb913d107dd3c09a65d1651175898735d commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 EOF +test_expect_success '%x00 shows NUL' ' + echo >expect commit f58db70b055c5718631e5c61528b28b12090cdea && + echo >>expect fooQbar && + git rev-list -1 --format=foo%x00bar HEAD >actual.nul && + nul_to_q <actual.nul >actual && + test_cmp expect actual +' + test_expect_success '%ad respects --date=' ' echo 2005-04-07 >expect.ad-short && git log -1 --date=short --pretty=tformat:%ad >output.ad-short master && @@ -200,6 +208,16 @@ test_expect_success 'add LF before non-empty (2)' ' grep "^$" actual ' +test_expect_success 'add SP before non-empty (1)' ' + git show -s --pretty=format:"%s% bThanks" HEAD^^ >actual && + test $(wc -w <actual) = 2 +' + +test_expect_success 'add SP before non-empty (2)' ' + git show -s --pretty=format:"%s% sThanks" HEAD^^ >actual && + test $(wc -w <actual) = 4 +' + test_expect_success '--abbrev' ' echo SHORT SHORT SHORT >expect2 && echo LONG LONG LONG >expect3 && |