Re: [PATCH 2/2] tests: fix diff order arguments in test_cmp
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 6, 2017, 22:10 UTC
- Message-ID
- <CAGZ79kZhF=-baqPPqTCsbdyybOTV+SdvTqYiRbvsvB1epqpkZQ@mail.gmail.com>
- In-Reply-To
- <20171006220101.GZ19555@aiede.mtv.corp.google.com>
On Fri, Oct 6, 2017 at 3:01 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 16 quoted lines
> Stefan Beller wrote: > >> Fix the argument order for test_cmp. When given the expected >> result first the diff shows the actual output with '+' and the >> expectation with '-', which is the convention for our tests. >> >> Signed-off-by: Stefan Beller <sbeller@google.com> >> --- > > Yes, this should make the output from failing tests easier to take in > at a glance. > > Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> > > How did you find these? E.g. is there a grep pattern that reviewers > can use to repeat your results?
The grunge work was done via scrolling through
git -C t grep test_cmp
However it occurred to me that checking for the completeness could be done via
git -C t grep test_cmp | \
awk '{$1=""; print } | \ # remove file name from output
sort | uniqThere are some cases that are still pretty obvious what the "actual" and the "expect" is, but they are not included in this patch as the code (and file names) looked hairy.