From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id umLoAUEqiWLpzAAAbAwnHQ (envelope-from ) for ; Sat, 21 May 2022 20:06:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EDvNAEEqiWK0YAAAauVa8A (envelope-from ) for ; Sat, 21 May 2022 20:06:57 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 967ED3CFFE for ; Sat, 21 May 2022 20:06:56 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D5E3A5F795; Sat, 21 May 2022 18:06:42 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 85C3A5F780 for ; Sat, 21 May 2022 18:06:40 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id E0D195FBD7; Sat, 21 May 2022 14:06:39 -0400 (EDT) Received: (nullmailer pid 2419247 invoked by uid 1000); Sat, 21 May 2022 18:06:36 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 3/3] test: replace deprecated use of notmuch_database_create Date: Sat, 21 May 2022 15:06:31 -0300 Message-Id: <20220521180631.2419225-3-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220521180631.2419225-1-david@tethera.net> References: <20220521180631.2419225-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: WOPL57EBS6RUS7KEBDILACE66PNIHPYW X-Message-ID-Hash: WOPL57EBS6RUS7KEBDILACE66PNIHPYW 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653156416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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-owner:list-unsubscribe:list-subscribe:list-post; bh=rsiPNcgrlSQMtQCPdyvQznutDtvjExu2GOHNrFzSxV0=; b=umIhWQOiWKdB7jeDBkYyDIYiWYFhe9JA4AR2joLEgdgXuI9EG7FdlpDkqJlAtQ6D4ROuhY nlhQRPFbGv7dPIroz3UsrQsJIclMpUx8v1PmhwLeKdeIY9srvlFIamgjz/2iPGHLuuE9Jx y9kuCtQcdezxPSLLssnDDywELcWeKZ2PpOULqPp4oq7IAALw+uu4n4JdauxK3SnCsDTucG oLvwN9OQGNTyZbCkhA98pQFi63fRxbUfjNLtzEll6OBnhBHD08F/1PO8FZ9HvoEeAdi51S oD5nqtDIYpcihC1gpoAemIF/n/EMbF22ug1VHjQx+obiHwGWe7hyMWfJvjUO5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653156416; a=rsa-sha256; cv=none; b=WswEbhfGvdiA0c3ognWcD7hRCXiSPLbK3oPdKS35/x+LQ09uVoVtL5IkAtlUvQGHKejU6W Hfhg1rhwXtS7Lcbjk5PdcGEvHFqNmOjbIUPnyie5hMVtb+i+vbvsRozMLBN2N+SD/WlPCi 7THuNNBta5iIpCaOVs8VIZyuXyzFEpNSj8k5+0D8NowUdsNDwYujy/r2BZ3z5X5/qZI19K n5l6xaxVAzlisBJ4PoG9Kw91DvDoiEkZAbmrSpP4U5BlTC3tDw1YUbNxEiwmTIfZyUwBVY GXAqRuzvkeexh8JXWRlb/lqSMteHci2m8xiIMSCMmeW+H1RXSTL0Oi5dzLjFsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.45 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 967ED3CFFE X-Spam-Score: -1.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: RxisGinIs91f Like notmuch_database_open, we need to conditionally print the error message. --- test/T560-lib-error.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 470537cc..80527afd 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -60,7 +60,10 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_create ("./nonexistent/foo", &db); + char *msg = NULL; + + stat = notmuch_database_create_with_config ("./nonexistent/foo", "", NULL, &db, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED @@ -99,7 +102,10 @@ test_C <<'EOF' int main (int argc, char** argv) { notmuch_status_t stat; - stat = notmuch_database_create (NULL, NULL); + char *msg; + + stat = notmuch_database_create_with_config (NULL, "", NULL, NULL, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED @@ -117,7 +123,10 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_create (argv[1], &db); + char *msg; + + stat = notmuch_database_create_with_config (argv[1], "", NULL, &db, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED -- 2.35.2