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 EKogOT5vCmEoAgEAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 12:43:10 +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 yIauND5vCmGeIQAAbx9fmQ (envelope-from ) for ; Wed, 04 Aug 2021 10:43:10 +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)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7FD71A4DE for ; Wed, 4 Aug 2021 12:43:10 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1C0672C0E8; Wed, 4 Aug 2021 06:42:53 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4EB742C0B0 for ; Wed, 4 Aug 2021 06:42:46 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 4667A5FD5C; Wed, 4 Aug 2021 06:42:46 -0400 (EDT) Received: (nullmailer pid 3986526 invoked by uid 1000); Wed, 04 Aug 2021 10:42:42 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 4/7] test/path-config: use test_expect_equal_file_nonempty Date: Wed, 4 Aug 2021 07:42:33 -0300 Message-Id: <20210804104236.3986362-5-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: HIAFY5M74DLRZBNTXZ5BOSETFIWUENWU X-Message-ID-Hash: HIAFY5M74DLRZBNTXZ5BOSETFIWUENWU 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=1628073790; 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=dPVAmmloADo7MRHps1P6weSomtdce+kpzfO3z1LD3EQ=; b=h+TDKczMFXGTQQMT8+KReMk7n3wpkhyu1uKQHS/FAae6vZITLVRJ488C7Cc/Ls+rsCAlJ2 MlZXDQjMm6Lx3pugkIzqYIsKjK/bh0B9Ts4yGht9QDOeVOOU15kcv0dEX4Smd/AaSBMoBg 5o8kA7iRmkPcIOcYUcyYG2uwZHtYTvxo8+dROmY9DP9sG43mP3LWxAyP+qmOoZfUq7eBAt /k12kA1jtqw6ydMXQ6c7SnRVsS64lD/L+5Oht6A3ySuWnBMYL9SdMcnybektMerVBUcXZi 2ilixdSgsH6XQUsZP+tVXQEP1ujnWRLi2/X3qZftN6EvcI0F9f93rmjT3DPqMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628073790; a=rsa-sha256; cv=none; b=eQz1CGo9gqKxv37tNMVEiCpIEl9wsiBEOFZT5vlz0M4RlVi9xM3ifpCkryQvdMxm1ZC21p Bzhg1z0YL6zOQfUecTEWvczrMb5At0AvAUbyLmTP11rMqOAx+MUWr0DvJM7NnG96UWMY7a Z0v6LqUsfwwsxLETAG6RSHB8vANeyQY0hSumqRlHqqpvOt7Z58jWcOCV5dWkUBEtslSat8 nwgtotIqDKrImrnjcAsi8bal9pV0to6PUEbMJCOP64CXWftemd92b2WZJo9PG7eKHpjyG7 JpWqLuZobkTQxRpXLhBY71E03GCvmYJtxDyyskzR9JO6CsNI5Py8dyxNVPuiKg== 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: -1.02 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: 7FD71A4DE X-Spam-Score: -1.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: x1nGu5ku4VXx This is more robust against crashes when the expected output is also generated by notmuch. In the case where the expected output is explicit, it seems like overkill. --- test/T055-path-config.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index bb3bf665..8271579f 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -141,13 +141,13 @@ EOF notmuch tag -inbox '*' notmuch restore < EXPECTED notmuch dump > OUTPUT - test_expect_equal_file EXPECTED OUTPUT + test_expect_equal_file_nonempty EXPECTED OUTPUT test_begin_subtest "reindex ($config)" notmuch search --output=messages '*' > EXPECTED notmuch reindex '*' notmuch search --output=messages '*' > OUTPUT - test_expect_equal_file EXPECTED OUTPUT + test_expect_equal_file_nonempty EXPECTED OUTPUT test_begin_subtest "use existing database ($config)" output=$(notmuch new) @@ -169,7 +169,7 @@ EOF test_begin_subtest "Show a raw message ($config)" add_message notmuch show --format=raw id:$gen_msg_id > OUTPUT - test_expect_equal_file $gen_msg_filename OUTPUT + test_expect_equal_file_nonempty $gen_msg_filename OUTPUT rm -f $gen_msg_filename test_begin_subtest "reply ($config)" @@ -198,14 +198,13 @@ EOF mkdir -p "$MAIL_DIR"/{cur,new,tmp} notmuch insert < "$gen_msg_filename" cur_msg_filename=$(notmuch search --output=files "subject:insert-subject") - test_expect_equal_file "$cur_msg_filename" "$gen_msg_filename" - + test_expect_equal_file_nonempty "$cur_msg_filename" "$gen_msg_filename" test_begin_subtest "compact+search ($config)" notmuch search --output=messages '*' | sort > EXPECTED notmuch compact notmuch search --output=messages '*' | sort > OUTPUT - test_expect_equal_file EXPECTED OUTPUT + test_expect_equal_file_nonempty EXPECTED OUTPUT test_begin_subtest "upgrade backup ($config)" features=$(xapian-metadata get $XAPIAN_PATH features | grep -v "^relative directory paths") -- 2.30.2