From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IEloFU9vCmFjAQEAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 12:43:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MIj/EE9vCmEdZwAAB5/wlQ (envelope-from ) for ; Wed, 04 Aug 2021 10:43:27 +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) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EDBC5A4F3 for ; Wed, 4 Aug 2021 12:43:26 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AC4792C100; Wed, 4 Aug 2021 06:43:03 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 0FC6C2C0DB for ; Wed, 4 Aug 2021 06:42:50 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 083085FD5C; Wed, 4 Aug 2021 06:42:49 -0400 (EDT) Received: (nullmailer pid 3986519 invoked by uid 1000); Wed, 04 Aug 2021 10:42:42 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 1/7] test/expect_equal_file: whitespace cleanup Date: Wed, 4 Aug 2021 07:42:30 -0300 Message-Id: <20210804104236.3986362-2-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210804104236.3986362-1-david@tethera.net> References: <20210804104236.3986362-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: GOTDSIIQ2GRXTLZQUACTK2OTY7ZA7WHL X-Message-ID-Hash: GOTDSIIQ2GRXTLZQUACTK2OTY7ZA7WHL 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=1628073807; 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=U3V83gF1RCOmy113PIjctI1GXxR6lZeLf9gjZJwuuMs=; b=YBdRUpErJWWODfwmf8ol75aLKHc3W8ktebF3aBE6I8hgN8lrKKn3eNNp3sZjt7PZ/o9tVv JpiFc86ifM+sxetQN7AsNaGOaFhvKXkTUc72PDWJw2iHHIClJScuOkfukGnzNrfk+kk1aA i9OF3+1KtC3fXy7axrrNH27/tSbkV0/OYSCLm6Fixk7ymm83VNPKcmLs2VzgpeCS0CDabv LjNYvEOXwFSYmhFoS8d8zg1njTwPyFxlr5/T9e+RjvC1zR90LdU9f9il+mJvS6bU5geN01 QCmCNSi++jR+1kwbIeCBpJw0J3XNwDd0S3GEAVF12QBNCQHZh8RvPk5rQ0aI8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628073807; a=rsa-sha256; cv=none; b=HwK0XvX1Zx0WZP9Fz9ZLylVhYd453i/HXtmjG7aHxIUZ4Ucej1hBFfCjP3qC0MUbsCEDaV nW3qHGVbcapDCUV021T+FoFAxkA7qwli3od/tvdi/EEQc/Q/ccgFv5Ay7IcsGyYCMia8J7 dt95ERgbsmAH5GnN/zQbkgS7aBU9jXoCz0KyQJY3/w6ggn2CByr8FouDi6I4dPDEfc8+3r 2va3YFF69/Gz+PYeqYQtR8aCuueI8AOz4zMM+sMUzlbMcCSVSYIoGyGnbmbCst7J8FNo/k p41zsaRjhSWIG7Xu+Vv/MQd7++rNq9Q7HWKkOWjdAdkpTxSgrK3VsswwFUO8yQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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.98 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: EDBC5A4F3 X-Spam-Score: -0.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: Sx0N7FY2+Bya 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 1dbc6f7f..1f696c44 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