From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0r.migadu.com with LMTPS id 4IB1BshCjWC+YgEALuJCtg (envelope-from ) for ; Sat, 01 May 2021 14:00:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id XQMzAshCjWAyPwAAB5/wlQ (envelope-from ) for ; Sat, 01 May 2021 12:00:08 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8911210F3C for ; Sat, 1 May 2021 14:00:07 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2BB93271EE; Sat, 1 May 2021 07:59:53 -0400 (EDT) Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by mail.notmuchmail.org (Postfix) with ESMTPS id 554A427182 for ; Sat, 1 May 2021 07:59:38 -0400 (EDT) Received: by mail-ot1-x333.google.com with SMTP id 92-20020a9d02e50000b029028fcc3d2c9eso953926otl.0 for ; Sat, 01 May 2021 04:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nMpoEjUpEWSZSdKWL/cMfWvC+e3zXRvIquWw2aKmQD0=; b=S0k5h55hEmrb5XZl6xkBK9xMYM80Cdvt556sJ4GLMUxL7/TqgKwW//hmGtkOjbdUyv 8Q/lZZ9oX+FshAzKtQTZU0oBZ39MPgPRPaGTSeK4VK9dZEEE06fS0ou12f+N9ijQpGTO 3voHbK/hYvvV+XVInLxiK8BjxwDaqwGQy/MBgP6hKO9TjCLZQi6qf7fSV9Bn3tskYELv xaj+TP54BlftO7wUpPSNWBMRkOn/WFquENJuwtDeWJAy4ylzrcH4FX0bhDBLSpkxtxuX m6eRr+nIYmrO+nyFWP32N0CXgNBbiRZydtau7LG0WRRyGEjeM74LYjz55Nah+wtpy/Cc vIPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nMpoEjUpEWSZSdKWL/cMfWvC+e3zXRvIquWw2aKmQD0=; b=Nqsh6Q4jtylmXyY9uSoVAlvnr1QRpe/h9IwIjC5EWmfC7WqSzzxrGithXk+41O2cYa Qr9kAD0tkMFDxm7P6ekCEr66ZjdMiKM/g8NgJsrZm8y0T7S3lZtk+k0cUNdEvIxyWcft X3Vj51aDKC6VWAmVrQ1YMhz7h/rFIjeXaa4pMjKeHRunR8BRe21uMXOi00DAX4J7KnpC m3LRKcZNIABC1D9bDarL9PXCTjdggP2h20+7KObhyVIpa32GuYhWVICwLyGmt4rlJ6am ea9RNUKQafGsY78dvindrAOFr+l085QWCyJEjS2dpUpXw8AusnisBxX9tsieLPmT7eRc a7/A== X-Gm-Message-State: AOAM530AsjFv8ReLiCyNeeZ1HLY3B0UkMKhUcH98GJv+It81No+vYBxd J4LHCzZkMGIjMmiSQPxzaFyvv/mdlnvz3A== X-Google-Smtp-Source: ABdhPJz9W2pSq6M9Hj9CoHCclOuVbvJaHit8VDULs9bIZHKVpu9S+f3MUQupDCUr5UEkYrHhS7p1tA== X-Received: by 2002:a9d:6ace:: with SMTP id m14mr4017007otq.218.1619870377433; Sat, 01 May 2021 04:59:37 -0700 (PDT) Received: from localhost ([2806:2f0:4060:638f:a2c5:89ff:fe0c:1151]) by smtp.gmail.com with ESMTPSA id l13sm75536ota.62.2021.05.01.04.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 04:59:37 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 8/9] test: ruby: don't use instance variables Date: Sat, 1 May 2021 06:59:22 -0500 Message-Id: <20210501115923.483816-9-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210501115923.483816-1-felipe.contreras@gmail.com> References: <20210501115923.483816-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Message-ID-Hash: MGQJ6MLNFJ3QDNPCSMARD5TGK5BHEJ2Q X-Message-ID-Hash: MGQJ6MLNFJ3QDNPCSMARD5TGK5BHEJ2Q 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: Daniel Kahn Gillmor , Ludovic LANGE , Tomi Ollila , 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=1619870407; 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=WZZaiVx6JwmWg8w/NXCYJPkCoKNlRHc44mcJ5Hjj3Ko=; b=cC9pDgfTrMd8h827M8HzqW80NBEyShipKS9Y7va0z83MQPRfRE393wNfJBbpV+MMmnJyND Vnm4+NgLUzLCJEIpmnnoj58znZlouQoY6TNFheDAE0Tpnlypg+cPbJQ2vc1NQn2E3TiWzY dbz1Hv5NFzAqH5M+CZ0HgyoNcA5c15Kq3j40zKfWscKxomAL2j8Lc0F1cv8a1uCqb5gYV2 Takt5vyiyNCKAYkYauITCROwNiu2rC4spNi5Y4ceVhway2F6fWYHRn6nrva4PpKsIBLk7+ 8yvvia+Bp3Qyk3WKkCoLd1sZ+v0y+Wq9HvFIKRjLpKaD69y2CHEwQ/fIUJ4IWw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619870407; a=rsa-sha256; cv=none; b=hsr6UdsYMbXcxbvAgMBaUs2FGoKZyvP7UGMYSMNf8e78NCRge3tSJ65NkUTYtw5n7BWtZ+ 7/DJYayjLmQBbR4k5LQWh5fK4uprX8FMrZ87lM985ACvFc7iTJZIVwz85215MuneFdTZrp 8mDE3fWo/cwciR9Dj9mEIxTr8YvQsh4AIQ+6IvrqpZ8if8/n7vFTsTWiTH4nJEiIHfmY9U 1kucoTPoOvv+P2gDfs8iY7fFYlq3Tv66kczYJAFX4IH3MwVTSsAwRBv7yWyZBQ7PQoHSN2 IHYmCslVR5IfC1aUf8M0PE89xu50kyMBfC82q8wbTd8Dzpb92NYBcHkKvkdDrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=S0k5h55h; 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 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=S0k5h55h; 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 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8911210F3C X-Spam-Score: -0.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4fzQAtSut3Ww Local variables are perfectly fine. Signed-off-by: Felipe Contreras --- test/T395-ruby.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh index f5a8d245..30168109 100755 --- a/test/T395-ruby.sh +++ b/test/T395-ruby.sh @@ -12,7 +12,7 @@ test_ruby() { ( cat <<-EOF require 'notmuch' - @db = Notmuch::Database.new('$MAIL_DIR') + db = Notmuch::Database.new('$MAIL_DIR') EOF cat ) | $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT @@ -22,9 +22,9 @@ test_ruby() { test_begin_subtest "compare thread ids" notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED test_ruby <<"EOF" -@q = @db.query('tag:inbox') -@q.sort = Notmuch::SORT_OLDEST_FIRST -@q.search_threads.each do |t| +q = db.query('tag:inbox') +q.sort = Notmuch::SORT_OLDEST_FIRST +q.search_threads.each do |t| puts t.thread_id end EOF @@ -32,9 +32,9 @@ EOF test_begin_subtest "compare message ids" notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED test_ruby <<"EOF" -@q = @db.query('tag:inbox') -@q.sort = Notmuch::SORT_OLDEST_FIRST -@q.search_messages.each do |m| +q = db.query('tag:inbox') +q.sort = Notmuch::SORT_OLDEST_FIRST +q.search_messages.each do |m| puts m.message_id end EOF @@ -42,25 +42,25 @@ EOF test_begin_subtest "get non-existent file" echo nil > EXPECTED test_ruby <<"EOF" -p @db.find_message_by_filename('i-dont-exist') +p db.find_message_by_filename('i-dont-exist') EOF test_begin_subtest "count messages" notmuch count --output=messages tag:inbox > EXPECTED test_ruby <<"EOF" -puts @db.query('tag:inbox').count_messages() +puts db.query('tag:inbox').count_messages() EOF test_begin_subtest "count threads" notmuch count --output=threads tag:inbox > EXPECTED test_ruby <<"EOF" -puts @db.query('tag:inbox').count_threads() +puts db.query('tag:inbox').count_threads() EOF test_begin_subtest "get all tags" notmuch search --output=tags '*' > EXPECTED test_ruby <<"EOF" -@db.all_tags.each do |tag| +db.all_tags.each do |tag| puts tag end EOF -- 2.31.0