Re: [PATCH 3/3] test: ruby: simplify basic tests

Subject: Re: [PATCH 3/3] test: ruby: simplify basic tests

Date: Sun, 23 May 2021 09:32:11 -0300

To: Felipe Contreras, notmuch@notmuchmail.org

Cc: Ludovic LANGE, Stefano Zacchiroli

From: David Bremner


Felipe Contreras <felipe.contreras@gmail.com> writes:

> We don't need to check for the order here, that is done in another test.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  test/T395-ruby.sh | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
> index e828efed..9298bc9e 100755
> --- a/test/T395-ruby.sh
> +++ b/test/T395-ruby.sh
> @@ -20,21 +20,17 @@ test_ruby() {
>  }
>  
>  test_begin_subtest "compare thread ids"
> -notmuch search --sort=oldest-first --output=threads tag:inbox > EXPECTED
> +notmuch search --output=threads tag:inbox > EXPECTED
>  test_ruby <<"EOF"
> -q = db.query('tag:inbox')
> -q.sort = Notmuch::SORT_OLDEST_FIRST
> -q.search_threads.each do |t|
> +db.query('tag:inbox').search_threads.each do |t|
>    puts 'thread:%s' % t.thread_id
>  end
>  EOF
>  

Is this assuming that the sort order in the CLI is the same as in the
library / bindings? that seems a bit fragile if so.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: