Re: [PATCH 1/4] test: correct comparison order in T380

Subject: Re: [PATCH 1/4] test: correct comparison order in T380

Date: Wed, 09 Feb 2022 22:47:46 +0200

To: Michael J Gruber, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Wed, Feb 09 2022, Michael J. Gruber wrote:

> Specifying test comparisons as "expected actual" gives a better readable
> diff since the "-" indicates missing, "+" additional items compared to
> the expectations.
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
>  test/T380-atomicity.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
> index afe49d93..a6f1e037 100755
> --- a/test/T380-atomicity.sh
> +++ b/test/T380-atomicity.sh
> @@ -93,7 +93,7 @@ if test_require_external_prereq gdb; then
>  fi
>  
>  test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts'
> -test_expect_equal_file searchall expectall
> +test_expect_equal_file expectall searchall

Good in princible, but if things are like decade ago, we still have
hundreds of these in wrong order -- if so, all should be changed for
consistency. If I am wrong and all / many of those are already changed,
then this is OK.

>  
>  test_begin_subtest "detected $outcount>10 abort points"
>  test_expect_success "test $outcount -gt 10"
> -- 
> 2.35.1.306.ga00bde9711
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: