From: Eric Sunshine Date: Fri, 02 Dec 2022 01:52:14 GMT Subject: Re: [PATCH v2 4/8] test-lib-functions: add and use test_cmp_cmd Message-ID: In-Reply-To: On Thu, Dec 1, 2022 at 8:45 PM Eric Sunshine 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.