Re: [PATCH v2 4/8] test-lib-functions: add and use test_cmp_cmd

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

 



On Thu, Dec 1, 2022 at 8:45 PM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> But, even that doesn't
> seem to buy much. The vast majority of cases where you've converted:
>
>     test "$dir" = "$(test-tool path-utils real_path $dir2)" &&
>
> to:
>
>     test_cmp_cmd "$dir" test-tool path-utils real_path $dir2 &&
>
> could just have easily become:
>
>     echo "$dir" >expect &&
>     test_cmp test-tool path-utils real_path $dir2 &&
>
> which isn't bad at all, even if it is one line longer, and it is
> idiomatic in this test suite.

I can't count. Of course, I meant:

     echo "$dir" >expect &&
     test-tool path-utils real_path $dir2 >actual &&
     test_cmp expect actual &&

which is two extra lines.



[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