Re: [PATCH] userdiff: add builtin diff driver for Kotlin language.
- From
jaydeepjd.8914@gmail.com <jaydeepjd.8914@gmail.com>
- Date
- Mar 1, 2022, 18:09 UTC
- Message-ID
- <c59383e0-d549-d198-f358-18153f18d24b@gmail.com>
- In-Reply-To
- <xmqq8rttsic1.fsf@gitster.g>
Thanks for the review.
I have some criticism regarding `t/t4018-diff-funcname.sh`.
When any test fails, its verbose output is not "verbose" enough. For example, If due to wrong xfuncname regex or wrong test, all of the following hunk headers
@@...@@ @@...@@fun right(){ @@...@@fun
produce the same verbose output:
`not ok:....hunk header:[testfilename]`
Initially, I had a difficult time to debug what was going wrong so as a temporary fix, I made `t/t4018-diff-funcname.sh` to `cat` out the hunk stored in `actual`.
``` # check each individual file for i in $(git ls-files) do test_expect_success "hunk header of file: $i" " git diff -U1 $i >actual && echo 'hunk:' && cat actual && echo && grep '@@ .* @@.*RIGHT' actual " done ```
Is there another proper way to make the test script produce the hunk for each test?
Thanks, Jaydeep.