Abhishek Kumar <abhishekkumar8222@xxxxxxxxx> 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 > <RED>|<RESET> *<MAGENTA>-<RESET><MAGENTA>.<RESET> octopus-merge > <RED>|<RESET><RED>/<RESET><YELLOW>|<RESET><BLUE>\<RESET> <MAGENTA>\<RESET> > @@ -57,16 +55,13 @@ test_expect_success 'log --graph with tricky octopus merge with colors' ' > <MAGENTA>|<RESET><MAGENTA>/<RESET> > * initial > EOF > - git log --color=always --graph --date-order --pretty=tformat:%s left octopus-merge >actual.colors.raw && > - test_decode_color <actual.colors.raw | sed "s/ *\$//" >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 ;-).