From: Junio C Hamano Date: Wed, 19 Feb 2020 17:29:34 GMT Subject: Re: [GSoC Patch 4/5] t4214: use lib-log-graph functions Message-ID: In-Reply-To: <20200216134750.18947-4-abhishekkumar8222@gmail.com> Abhishek Kumar writes: > @@ -24,7 +25,7 @@ test_expect_success 'set up merge history' ' > ' > > test_expect_success 'log --graph with tricky octopus merge, no color' ' > - cat >expect.uncolored <<-\EOF && > + test_cmp_graph --pretty=tformat:%s --color=never --date-order left octopus-merge <<-\EOF > * left > | *-. octopus-merge > |/|\ \ > @@ -37,14 +38,11 @@ test_expect_success 'log --graph with tricky octopus merge, no color' ' > |/ > * initial > EOF > - git log --color=never --graph --date-order --pretty=tformat:%s left octopus-merge >actual.raw && > - sed "s/ *\$//" actual.raw >actual && > - test_cmp expect.uncolored actual > ' > > test_expect_success 'log --graph with tricky octopus merge with colors' ' > test_config log.graphColors red,green,yellow,blue,magenta,cyan && > - cat >expect.colors <<-\EOF && > + test_cmp_colored_graph --pretty=tformat:%s --date-order left octopus-merge <<-\EOF > * left > | *-. octopus-merge > |/|\ \ > @@ -57,16 +55,13 @@ test_expect_success 'log --graph with tricky octopus merge with colors' ' > |/ > * initial > EOF > - git log --color=always --graph --date-order --pretty=tformat:%s left octopus-merge >actual.colors.raw && > - test_decode_color actual.colors && > - test_cmp expect.colors actual.colors > ' > ... Unlike the previous two steps, this does seem to make the script cleaner and slightly more readable (it is still unreadable but that is mostly due to the contents of the here-doc text and cannot be helped ;-).