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 ms11 with LMTPS id 8DAPAji0Ll/SCQAA0tVLHw (envelope-from ) for ; Sat, 08 Aug 2020 14:18:32 +0000 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 sDJ1OTe0Ll+wJQAAB5/wlQ (envelope-from ) for ; Sat, 08 Aug 2020 14:18:31 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 53E83940223 for ; Sat, 8 Aug 2020 14:18:31 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B42AC29B63; Sat, 8 Aug 2020 10:17:51 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 08D8C29AE7 for ; Sat, 8 Aug 2020 10:17:24 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E53835FA66; Sat, 8 Aug 2020 10:17:23 -0400 (EDT) Received: (nullmailer pid 1124257 invoked by uid 1000); Sat, 08 Aug 2020 14:17:04 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 01/19] test: use keys with group 'test' in T590-libconfig Date: Sat, 8 Aug 2020 11:16:35 -0300 Message-Id: <20200808141653.1124111-2-david@tethera.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200808141653.1124111-1-david@tethera.net> References: <20200808141653.1124111-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: PD736GOCAQ3XMPDPFQRUAAZFBF7YNWDW X-Message-ID-Hash: PD736GOCAQ3XMPDPFQRUAAZFBF7YNWDW 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-Scanner: scn0 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-Spam-Score: 0.03 X-TUID: H5qTIFX5jwcg In a future commit we want to interoperate better with glib KeyFiles, which need groups for all keys. --- test/T590-libconfig.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 360e45b0..8c34acf9 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -28,18 +28,18 @@ EOF test_begin_subtest "notmuch_database_{set,get}_config" cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { - EXPECT0(notmuch_database_set_config (db, "testkey1", "testvalue1")); - EXPECT0(notmuch_database_set_config (db, "testkey2", "testvalue2")); - EXPECT0(notmuch_database_get_config (db, "testkey1", &val)); - printf("testkey1 = %s\n", val); - EXPECT0(notmuch_database_get_config (db, "testkey2", &val)); - printf("testkey2 = %s\n", val); + EXPECT0(notmuch_database_set_config (db, "test.key1", "testvalue1")); + EXPECT0(notmuch_database_set_config (db, "test.key2", "testvalue2")); + EXPECT0(notmuch_database_get_config (db, "test.key1", &val)); + printf("test.key1 = %s\n", val); + EXPECT0(notmuch_database_get_config (db, "test.key2", &val)); + printf("test.key2 = %s\n", val); } EOF cat <<'EOF' >EXPECTED == stdout == -testkey1 = testvalue1 -testkey2 = testvalue2 +test.key1 = testvalue1 +test.key2 = testvalue2 == stderr == EOF test_expect_equal_file EXPECTED OUTPUT @@ -93,8 +93,8 @@ EOF cat <<'EOF' >EXPECTED == stdout == aaabefore beforeval -testkey1 testvalue1 -testkey2 testvalue2 +test.key1 testvalue1 +test.key2 testvalue2 zzzafter afterval == stderr == EOF @@ -115,8 +115,8 @@ EOF cat <<'EOF' >EXPECTED == stdout == aaabefore 1 -testkey1 1 -testkey2 1 +test.key1 1 +test.key2 1 zzzafter 1 == stderr == EOF @@ -126,7 +126,7 @@ test_begin_subtest "notmuch_database_get_config_list: one prefix" cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_config_list_t *list; - EXPECT0(notmuch_database_get_config_list (db, "testkey", &list)); + EXPECT0(notmuch_database_get_config_list (db, "test.key", &list)); for (; notmuch_config_list_valid (list); notmuch_config_list_move_to_next (list)) { printf("%s %s\n", notmuch_config_list_key (list), notmuch_config_list_value(list)); } @@ -135,8 +135,8 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} EOF cat <<'EOF' >EXPECTED == stdout == -testkey1 testvalue1 -testkey2 testvalue2 +test.key1 testvalue1 +test.key2 testvalue2 == stderr == EOF test_expect_equal_file EXPECTED OUTPUT @@ -152,8 +152,8 @@ cat <<'EOF' >EXPECTED #notmuch-dump batch-tag:3 config #@ aaabefore beforeval #@ key%20with%20spaces value,%20with,%20spaces%21 -#@ testkey1 testvalue1 -#@ testkey2 testvalue2 +#@ test.key1 testvalue1 +#@ test.key2 testvalue2 #@ zzzafter afterval EOF test_expect_equal_file EXPECTED OUTPUT @@ -162,7 +162,7 @@ test_begin_subtest "restore config" notmuch dump --include=config >EXPECTED cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { - EXPECT0(notmuch_database_set_config (db, "testkey1", "mutatedvalue")); + EXPECT0(notmuch_database_set_config (db, "test.key1", "mutatedvalue")); } EOF notmuch restore --include=config