Re: [PATCH 2/8] t3206: add color test for range-diff --dual-color
- From
Stefan Beller <sbeller@google.com>
- Date
- Jul 30, 2018, 19:55 UTC
- Message-ID
- <CAGZ79kbw_Ps85qbgRbDji5pmRjpJkRhqqXvthdDbfkCO7Gqjxg@mail.gmail.com>
- In-Reply-To
- <CAPig+cRgfeSTFLdGpUkzH5PuKE39W9CFxx--yarF_27q1c=yCw@mail.gmail.com>
On Fri, Jul 27, 2018 at 11:28 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 9 quoted lines
> > On Fri, Jul 27, 2018 at 11:05 PM Stefan Beller <sbeller@google.com> wrote: > > The 'expect'ed outcome is taken by running the 'range-diff |decode'; > > it is not meant as guidance, rather as a documentation of the current > > situation. > > I'm not really sure what this is trying to say. It seems _too_ brief. > > Did you want a space after the vertical bar before "decode"?
I am trying to say that this patch was generated by inserting a "true && test_pause" first and then inside that paused test, I just run
source <path>/t/test-lib-functions.sh
git range-diff changed...changed-message --color --dual-color \
| test_decode_colorand saved that as the expected outcome, I was prepared to massage it gently by s/<TAB>/Q/ but that was not needed, but I forgot the q_to_tab in place.
By adding the test this way, I just want to state "I observed the functionality as produced in this patch". I do not want to endorse the coloring scheme or claim it is good (it is, but I also still have nits to pick). So I tried to briefly say that the test is essentially "autogenerated" by just observing output at that point in time.
Show 11 quoted lines
> > > Signed-off-by: Stefan Beller <sbeller@google.com> > > --- > > diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh > > +test_expect_success 'simple coloring' ' > > + q_to_tab >expect <<-EOF && > > Why 'q_to_tab'? I don't see any "q"'s in the body. > > I also don't see any variable interpolation in the body, so maybe you > want -\EOF instead?
All good suggestions! Thanks for the review, I'll incorporate them.
Thanks, Stefan