From: Josef Kufner Date: Fri, 11 Sep 2015 23:25:12 GMT Subject: [PATCH 2/3] Add tests for "pretty: Pass graph width to pretty formatting for use in '%>|(N)'" Message-ID: <1442013913-2970-2-git-send-email-josef@kufner.cz> In-Reply-To: <1442013913-2970-1-git-send-email-josef@kufner.cz> Signed-off-by: Josef Kufner --- t/t4205-log-pretty-formats.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 7398605..3358837 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -319,6 +319,18 @@ EOF test_cmp expected actual ' +# Note: Space between 'message' and 'two' should be in the same column as in previous test. +test_expect_success 'right alignment formatting at the nth column with --graph. i18n.logOutputEncoding' ' + git -c i18n.logOutputEncoding=$test_encoding log --graph --pretty="tformat:%h %>|(40)%s" >actual && + qz_to_tab_space <expected && +* $head1 message two +* $head2 message one +* $head3 add bar +* $head4 $(commit_msg) +EOF + test_cmp expected actual +' + test_expect_success 'right alignment formatting with no padding' ' git log --pretty="tformat:%>(1)%s" >actual && cat <expected && @@ -330,6 +342,17 @@ EOF test_cmp expected actual ' +test_expect_success 'right alignment formatting with no padding and with --graph' ' + git log --graph --pretty="tformat:%>(1)%s" >actual && + cat <expected && +* message two +* message one +* add bar +* $(commit_msg) +EOF + test_cmp expected actual +' + test_expect_success 'right alignment formatting with no padding. i18n.logOutputEncoding' ' git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%>(1)%s" >actual && cat <expected && -- 2.5.1