From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +KZCN5TcqmBZbQEAgWs5BA (envelope-from ) for ; Mon, 24 May 2021 00:52:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8H3rMpTcqmA1YwAAbx9fmQ (envelope-from ) for ; Sun, 23 May 2021 22:52:04 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D18DB12BC1 for ; Mon, 24 May 2021 00:52:02 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B98B02AA5C; Sun, 23 May 2021 18:51:58 -0400 (EDT) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by mail.notmuchmail.org (Postfix) with ESMTPS id 83EA92A9C2 for ; Sun, 23 May 2021 18:51:55 -0400 (EDT) Received: by mail-ed1-x52c.google.com with SMTP id g7so17574181edm.4 for ; Sun, 23 May 2021 15:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aJMogFs9xHb/PXrrsgEjWyitA8aFLxw5Kj0KtqDg9k8=; b=KT/p09feD5vxtbAPHIoAY6vCH2j7VzGOfi/8dUszCy9kMVCyvulJP+k+0AXH6+Tsmp X2BhNb1OfYyE0b8l3LNrb8MAs8+2QwjUXGWzBCBuhFD4gAPpZ5lkmpoCGmm+R5iu6d3w m2LPQoGZrnWCn+4ocsv52e3927ht2yWrEpVWoivfUaof8Ziz7eT6nuI8Cz+4kV88ha65 4npUev4m62/5kYlY2OAaIRBreiysQq1rZ7kY9mlpvSpvlgR8x7hv3ZHXmkF5Dks+56gI MMa8ctjfHlkKaIPQwlihP9sXfCtwe7oxZ22y6nBPs27fDAVJ6FAuZvHkKAy3yyHufWdy IkyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aJMogFs9xHb/PXrrsgEjWyitA8aFLxw5Kj0KtqDg9k8=; b=a2paCZXpR0XN67L8oBN4sg5oH6tMIuob1QWCSJNneAcHaZdYTvWHqatekbfyNftbZI jzdKBYq/qKFFkOlmdQWp17aC4DfXRquR11+Un0Y1DzOz0fXmBqL30atnZc0aALEjWuka j8jmnK3SwZ8qnRHolJygG7UlOksb9qwSbJ7X0eUtVAtGV2Lpcc/5VJms6WkX2rLrq+Kt V3jboq1I0Hm9A1ahHRhDdzI9l3baFwQL1vvmFKamwOzgXsMwSwBk2lgIt9Rdrn/fkp7P aelzrs7SdzoMip3xxVpCklLgpYORP4/BFLubKgyAM2AsfIO56A1fueJ5cXhfUw/2i5g7 y77g== X-Gm-Message-State: AOAM530GaMnt5UQ6n8w+ABUpccFmLL99Laa2hP9se6/bysyT/CwkFL1e fjzZmDI5QVgmlGg8JeQOtNMT9eMOwVgS+nM5gYM= X-Google-Smtp-Source: ABdhPJyp7C8oF+ErQokcp93otj4zgBSicjzTTdu3ylz4ItwkWDyNA8EMr0PcxeYgK0koMZ7SsC6+KehrWOPn5nMAIOE= X-Received: by 2002:a05:6402:337:: with SMTP id q23mr22055537edw.215.1621810312097; Sun, 23 May 2021 15:51:52 -0700 (PDT) MIME-Version: 1.0 References: <20210501120448.484082-1-felipe.contreras@gmail.com> <20210501120448.484082-4-felipe.contreras@gmail.com> <87zgwlr5pw.fsf@tethera.net> In-Reply-To: <87zgwlr5pw.fsf@tethera.net> From: Felipe Contreras Date: Sun, 23 May 2021 17:51:40 -0500 Message-ID: Subject: Re: [PATCH 3/3] test: ruby: simplify basic tests To: David Bremner Message-ID-Hash: ZWXE7HDAHCEQY55VH7WPKP52AUC2Q2QF X-Message-ID-Hash: ZWXE7HDAHCEQY55VH7WPKP52AUC2Q2QF X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" , Ludovic LANGE , Stefano Zacchiroli X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621810323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FeUnS71Bsyp+EfVqtsYRuzH6RihtEw83TpcApu5cjfI=; b=Z3D8knqSlJ0+nXn7OMCb5lsJaovExrvht93HYTOTvSdMea1feRkP7ghqodHk4thTtfhPXb gS87i+oWhAfGCpeqdmSi6izL7cc+2I5yA7QiDe2tRjqSUVYDEsQEt/+tKtgOkBvKPCcHGr 7R6EsLeAFM7aPkspz+iNJySJugFaEi5qhfNiqVfG9CWwXhsqjL73quadmajHj1tVwZG0fL j8OIRA61DWQHnAjCJr86K1ypW41vQqSD8VzluDq9E3VsQOtTsp37Sx+PrBQe/AIourUMQJ DQn5JAKSd6SrFfN3J6EExj34TdaGjmsbFRV9jbXY6GNtlOJa8eKYaIf0n6AxoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621810323; a=rsa-sha256; cv=none; b=dwT8L+tQ84vUvUDRcSnjMQ+rV3HVJA/zpOA5PLJKiEsA5EOCKlseCZ3fAuBahJQRxcCdh7 BZSRzgybiN3EaN0Jhyzp9qFE35XlLTe1Pj+3e45hRHhDkBDO3526h8lftQXxUtxO4168bL 1BOTvbtazceJ/fLCV1okt5th9LOBZJityCUOX5SGtCH6kjjJKH7u9Yck3HD/G/G8JPD/Sk ZZ9FEhBb56DeCE7/RmrXyE+Yl6UagJiXV/8bXdgVUxdy8N9gcq4xs9LkqEtSc6ur2ouLj2 tWn6wu53OYhib+D88FzLeWEW3Qgend1Ozv3EHEvIN81QrhoyAOKzkgHV6/KngQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b="KT/p09fe"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b="KT/p09fe"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D18DB12BC1 X-Spam-Score: -0.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2GCs2RqcAp4F On Sun, May 23, 2021 at 7:32 AM David Bremner wrote: > > Felipe Contreras writes: > > > We don't need to check for the order here, that is done in another test. > > > > Signed-off-by: Felipe Contreras > > --- > > 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. Both the CLI and the bindings are using the same libnotmuch library. If neither of them specify a sort order, the default sort order of libnotmuch would be used (I presume). Exactly the same order I would get if I write a C program that uses libnotmuch and doesn't specify any order. Why would the CLI specify an order the user didn't specify to libnotmuch? -- Felipe Contreras