Re: [PATCH] Add tests for "Pass graph width to pretty formatting, so '%>|' can work properly"
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 11, 2015, 19:37 UTC
- Message-ID
- <CAPig+cRkSRSC0eaBencw8cFrd64sUBQE44aSJ0T2WyPg2JTFCw@mail.gmail.com>
- In-Reply-To
- <1441993845-25778-1-git-send-email-josef@kufner.cz>
On Fri, Sep 11, 2015 at 1:50 PM, Josef Kufner <josef@kufner.cz> wrote:
> ---
Missing sign-off. Or is this intended to be concatenated with the patch you sent earlier?
Show 12 quoted lines
> 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 <<EOF | iconv -f utf-8 -t $test_encoding >expected &&
You don't seem to be taking advantage of qz_to_tab_space's transliteration of Q to tab and Z to space, so s/qz_to_tab_space/cat/ would make the code clearer.
Show 25 quoted lines
> +* $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 <<EOF >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 <<EOF >expected && > +* message two > +* message one > +* add bar > +* $(commit_msg) > +EOF > + test_cmp expected actual > +'