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 3/3] test: ruby: simplify basic tests
Date: Sat,  1 May 2021 07:04:48 -0500	[thread overview]
Message-ID: <20210501120448.484082-4-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20210501120448.484082-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.31.0

  parent reply	other threads:[~2021-05-01 12:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 12:04 [PATCH 0/3] ruby: improve db.query Felipe Contreras
2021-05-01 12:04 ` [PATCH 1/3] ruby: use notmuch_exclude_t enum Felipe Contreras
2021-05-23 12:28   ` David Bremner
2021-05-01 12:04 ` [PATCH 2/3] ruby: add keyword arguments to db.query Felipe Contreras
2021-05-23 12:29   ` David Bremner
2021-05-24  2:23     ` Felipe Contreras
2021-05-01 12:04 ` Felipe Contreras [this message]
2021-05-23 12:32   ` [PATCH 3/3] test: ruby: simplify basic tests David Bremner
2021-05-23 22:51     ` Felipe Contreras
2021-06-07 23:53       ` David Bremner
2021-06-08  1:29         ` 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=20210501120448.484082-4-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).