Re: [PATCH] test: add git apply whitespace expansion tests
- From
Kyle J. McKay <mackyle@gmail.com>
- Date
- Jan 22, 2015, 06:55 UTC
- Message-ID
- <21FC5344-64BF-46B1-ADA9-DDE3B1FEC8C4@gmail.com>
- In-Reply-To
- <xmqq1tmnwypp.fsf@gitster.dls.corp.google.com>
On Jan 21, 2015, at 14:33, Junio C Hamano wrote:
Show 7 quoted lines
> "Kyle J. McKay" <mackyle@gmail.com> writes: > >> So since I've not been able to get test 2 or 3 to core dump (even >> before 250b3c6c) I tend to believe you are correct in that the code >> thinks (incorrectly) that the result should fit within the buffer. > > Thanks; let me steal your tests when I reroll.
Awesome. :)
But please squash in this tiny change if using the tests verbatim:
On Jan 18, 2015, at 02:49, Kyle J. McKay wrote:
Show 8 quoted lines
> +# > +## create test-N, patchN.patch, expect-N files > +# > + > +# test 1 > +printf '\t%s\n' 1 2 3 4 5 6 > before > +printf '\t%s\n' 1 2 3 > after > +printf '%64s\n' a b c $x >> after
This line ^ in test 1 should not have a '$x' in it. It should just be:
> +printf '%64s\n' a b c >> after
The test runs fine currently, but if somehow x should get defined before running the tests, test 1 would fail. All the other '$x' in the other tests are correct.
Show 7 quoted lines
> +printf '\t%s\n' 4 5 6 >> after > +git diff --no-index before after | \ > +sed -e 's/before/test-1/' -e 's/after/test-1/' > patch1.patch > +printf '%64s\n' 1 2 3 4 5 6 > test-1 > +printf '%64s\n' 1 2 3 a b c 4 5 6 > expect-1 > + > +# test 2
-Kyle