Re: [PATCH 1/6] t4051: add test for comments preceding function lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 18, 2017 at 1:04 PM, René Scharfe <l.s.r@xxxxxx> wrote:
> 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@xxxxxx>
> ---
> 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?

> 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
>  {




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux