unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Cc: Ludovic LANGE <ll-notmuchmail@lange.nom.fr>,
	Stefano Zacchiroli <zack@upsilon.cc>
Subject: [PATCH v2 2/2] test: ruby: simplify basic tests
Date: Sun, 23 May 2021 21:19:10 -0500	[thread overview]
Message-ID: <20210524021910.92145-3-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20210524021910.92145-1-felipe.contreras@gmail.com>

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
 
 test_begin_subtest "compare message ids"
-notmuch search --sort=oldest-first --output=messages tag:inbox > EXPECTED
+notmuch search --output=messages tag:inbox > EXPECTED
 test_ruby <<"EOF"
-q = db.query('tag:inbox')
-q.sort = Notmuch::SORT_OLDEST_FIRST
-q.search_messages.each do |m|
+db.query('tag:inbox').search_messages.each do |m|
   puts 'id:%s' % m.message_id
 end
 EOF
-- 
2.32.0.rc0

  parent reply	other threads:[~2021-05-24  2:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  2:19 [PATCH v2 0/2] ruby: improve db.query Felipe Contreras
2021-05-24  2:19 ` [PATCH v2 1/2] ruby: add keyword arguments to db.query Felipe Contreras
2021-06-27 17:18   ` David Bremner
2021-06-28  7:46     ` Felipe Contreras
2021-05-24  2:19 ` Felipe Contreras [this message]
2021-06-04  6:08 ` [PATCH v2 0/2] ruby: improve db.query Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210524021910.92145-3-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=ll-notmuchmail@lange.nom.fr \
    --cc=notmuch@notmuchmail.org \
    --cc=zack@upsilon.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).