Re: [PATCH 1/6] t4051: add test for comments preceding function lines
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 19, 2017, 01:18 UTC
- Message-ID
- <CAPig+cQTzBYLqHw5TRYFajTK2Uq2fE=q=h=b=VA43zdJs0_CMA@mail.gmail.com>
- In-Reply-To
- <b5815f62-3ed4-58ea-6d32-b156e44cbe3f@web.de>
On Sat, Nov 18, 2017 at 1:04 PM, René Scharfe <l.s.r@web.de> wrote:
Show 11 quoted lines
> When showing function context it would be helpful to show comments > immediately before declarations, as they are most likely relevant. Add > a test for that. > > Signed-off-by: Rene Scharfe <l.s.r@web.de> > --- > diff --git a/t/t4051-diff-function-context.sh b/t/t4051-diff-function-context.sh > @@ -85,6 +85,10 @@ test_expect_success 'setup' ' >> +test_expect_failure ' context includes comment' ' > + grep "^ .*Hello comment" changed_hello.diff > +'
This shows only that the the "* Hello comment." line is in the context but says nothing about the entire comment block being included (which patch 3/6 implements). Perhaps the test could be more thorough?
Show 11 quoted lines
> diff --git a/t/t4051/hello.c b/t/t4051/hello.c
> index 63b1a1e4ef..73e767e178 100644
> --- a/t/t4051/hello.c
> +++ b/t/t4051/hello.c
> @@ -1,4 +1,7 @@
>
> +/*
> + * Hello comment.
> + */
> static void hello(void) // Begin of hello
> {