From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MNbPAdAKCGHa6wAAgWs5BA (envelope-from ) for ; Mon, 02 Aug 2021 17:10:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QPATOc8KCGFxbwAAB5/wlQ (envelope-from ) for ; Mon, 02 Aug 2021 15:10:07 +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 AF6522C7CA for ; Mon, 2 Aug 2021 17:10:07 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E15912C076; Mon, 2 Aug 2021 11:09:46 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 6C03F2C04F for ; Mon, 2 Aug 2021 11:09:36 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 640D85FD5C; Mon, 2 Aug 2021 11:09:36 -0400 (EDT) Received: (nullmailer pid 3234747 invoked by uid 1000); Mon, 02 Aug 2021 15:09:30 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 2/8] test/expect_equal_file: whitespace cleanup Date: Mon, 2 Aug 2021 12:09:16 -0300 Message-Id: <20210802150922.3234616-3-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210802150922.3234616-1-david@tethera.net> References: <87bl9lx864.fsf@kisara.moe> <20210802150922.3234616-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: MQQTSOCNYAYPQVPCWKKLQ7HRTEZ2MQVK X-Message-ID-Hash: MQQTSOCNYAYPQVPCWKKLQ7HRTEZ2MQVK X-MailFrom: bremner@tethera.net 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 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=1627917007; 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; bh=7HeKaD8kkEFy3917BObfu5aN+u9dEELuxptfdwTcWfQ=; b=usWF8rgz5rQl21zIO2dZ8dHr/q9Ytm/xYAK/VbRLGtxQrMU/LKvbXDAeJvKQ4anX3Jwy/I MmgCzn67BMujP38Y7hmdeYBMWhGhvMjWFeHovMP6UqDQp+mVERbJlLFXc6HlJ2KAS0zlCN cPHzUcZ/lP2M7yhwp+Y5eQ1G1pnvixSucbvl1EPFwvqe9MB9elYlZPoxLiPXDh+r25nEXv P7L67uV094yevkD36Keh8cvW0rd30hCtF2zx7SggU+IyDqP8qWguTjTGEU6RVRvYMivZsB YDnX56yvQt/prrvwZLn6GfY1G+9/v/BlpJ6PxZCfoaFYv+R5LLz/jz4CCQjXpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627917007; a=rsa-sha256; cv=none; b=HGuwsxysggdnJJjirFlBIdFYU6xRdSxVCab5Q0DsH1XuMuFHdeYXHz4BoUXqSKGSPqttee torsqKXVgX/NoIAGyVMw/MhexsmTCT6TYQxSS2Bj+7PypMq8cGECfk0cpSwHPUG7KPAjFH xS54PrXyc4wfIGe9psf84Kw91kN1QOEHXlI/5HhwlOcEgEpP5Vxkf7m97wkKfxSkY/Y9Co yHVu53X6M5guRleueiSLj8z0vymNpwQsFSVoaNantU/lWDOriN5kKwuFi2Wd6aFIhk94K4 D5lkZaGpEAIAWIjXFQCa9BDrraHIafdXgNog/UI/hcw1KsesDD53EpUfnJ4Zyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: AF6522C7CA X-Spam-Score: 0.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: v1dz/bkBKqV2 No functional change, just reindent to Emacs defaults. --- test/test-lib.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 67ad8853..10ee9b72 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -404,29 +404,29 @@ test_expect_equal () { # Like test_expect_equal, but takes two filenames. test_expect_equal_file () { - local file1 file2 testname basename1 basename2 - exec 1>&6 2>&7 # Restore stdout and stderr - if [ -z "$inside_subtest" ]; then - error "bug in the test script: test_expect_equal_file without test_begin_subtest" - fi - inside_subtest= - test "$#" = 2 || + local file1 file2 testname basename1 basename2 + exec 1>&6 2>&7 # Restore stdout and stderr + if [ -z "$inside_subtest" ]; then + error "bug in the test script: test_expect_equal_file without test_begin_subtest" + fi + inside_subtest= + test "$#" = 2 || error "bug in the test script: not 2 parameters to test_expect_equal_file" - file1="$1" - file2="$2" - if ! test_skip "$test_subtest_name" - then - if diff -q "$file1" "$file2" >/dev/null ; then - test_ok_ - else - testname=$this_test.$test_count - basename1=`basename "$file1"` - basename2=`basename "$file2"` - cp "$file1" "$testname.$basename1" - cp "$file2" "$testname.$basename2" - test_failure_ "$(diff -u "$testname.$basename1" "$testname.$basename2")" - fi + file1="$1" + file2="$2" + if ! test_skip "$test_subtest_name" + then + if diff -q "$file1" "$file2" >/dev/null ; then + test_ok_ + else + testname=$this_test.$test_count + basename1=`basename "$file1"` + basename2=`basename "$file2"` + cp "$file1" "$testname.$basename1" + cp "$file2" "$testname.$basename2" + test_failure_ "$(diff -u "$testname.$basename1" "$testname.$basename2")" + fi fi } -- 2.30.2