* [PATCH] test/libconfig: make indexing more consistent
@ 2021-06-19 13:31 David Bremner
2021-06-20 20:04 ` Tomi Ollila
2021-06-21 10:07 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2021-06-19 13:31 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
The other tests have converted to two digit decimal, the commit does
the same to the remaining test that was printing out indices in hex.
---
test/T590-libconfig.sh | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
index bc7298f8..189381f7 100755
--- a/test/T590-libconfig.sh
+++ b/test/T590-libconfig.sh
@@ -713,23 +713,23 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
key < NOTMUCH_CONFIG_LAST;
key = (notmuch_config_key_t)(key + 1)) {
const char *val = notmuch_config_get (db, key);
- printf("%x: '%s'\n", key, val ? val : "NULL" );
+ printf("%02d: '%s'\n", key, val ? val : "NULL" );
}
}
EOF
cat <<'EOF' >EXPECTED
== stdout ==
-0: 'MAIL_DIR'
-1: 'MAIL_DIR'
-2: 'MAIL_DIR/.notmuch/hooks'
-3: 'MAIL_DIR/.notmuch/backups'
-4: 'foo;bar;fub'
-5: 'unread;inbox'
-6: 'sekrit_junk'
-7: 'true'
-8: 'test_suite@notmuchmail.org'
-9: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
-a: 'Notmuch Test Suite'
+00: 'MAIL_DIR'
+01: 'MAIL_DIR'
+02: 'MAIL_DIR/.notmuch/hooks'
+03: 'MAIL_DIR/.notmuch/backups'
+04: 'foo;bar;fub'
+05: 'unread;inbox'
+06: 'sekrit_junk'
+07: 'true'
+08: 'test_suite@notmuchmail.org'
+09: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
+10: 'Notmuch Test Suite'
== stderr ==
EOF
test_expect_equal_file EXPECTED OUTPUT
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] test/libconfig: make indexing more consistent
2021-06-19 13:31 [PATCH] test/libconfig: make indexing more consistent David Bremner
@ 2021-06-20 20:04 ` Tomi Ollila
2021-06-21 10:07 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2021-06-20 20:04 UTC (permalink / raw)
To: David Bremner, notmuch
On Sat, Jun 19 2021, David Bremner wrote:
> The other tests have converted to two digit decimal, the commit does
> the same to the remaining test that was printing out indices in hex.
LGTM.
Tomi
> ---
> test/T590-libconfig.sh | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
> index bc7298f8..189381f7 100755
> --- a/test/T590-libconfig.sh
> +++ b/test/T590-libconfig.sh
> @@ -713,23 +713,23 @@ cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} %NULL% %NULL%
> key < NOTMUCH_CONFIG_LAST;
> key = (notmuch_config_key_t)(key + 1)) {
> const char *val = notmuch_config_get (db, key);
> - printf("%x: '%s'\n", key, val ? val : "NULL" );
> + printf("%02d: '%s'\n", key, val ? val : "NULL" );
> }
> }
> EOF
> cat <<'EOF' >EXPECTED
> == stdout ==
> -0: 'MAIL_DIR'
> -1: 'MAIL_DIR'
> -2: 'MAIL_DIR/.notmuch/hooks'
> -3: 'MAIL_DIR/.notmuch/backups'
> -4: 'foo;bar;fub'
> -5: 'unread;inbox'
> -6: 'sekrit_junk'
> -7: 'true'
> -8: 'test_suite@notmuchmail.org'
> -9: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
> -a: 'Notmuch Test Suite'
> +00: 'MAIL_DIR'
> +01: 'MAIL_DIR'
> +02: 'MAIL_DIR/.notmuch/hooks'
> +03: 'MAIL_DIR/.notmuch/backups'
> +04: 'foo;bar;fub'
> +05: 'unread;inbox'
> +06: 'sekrit_junk'
> +07: 'true'
> +08: 'test_suite@notmuchmail.org'
> +09: 'test_suite_other@notmuchmail.org;test_suite@otherdomain.org'
> +10: 'Notmuch Test Suite'
> == stderr ==
> EOF
> test_expect_equal_file EXPECTED OUTPUT
> --
> 2.30.2
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] test/libconfig: make indexing more consistent
2021-06-19 13:31 [PATCH] test/libconfig: make indexing more consistent David Bremner
2021-06-20 20:04 ` Tomi Ollila
@ 2021-06-21 10:07 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2021-06-21 10:07 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> The other tests have converted to two digit decimal, the commit does
> the same to the remaining test that was printing out indices in hex.
applied to master.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-21 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-19 13:31 [PATCH] test/libconfig: make indexing more consistent David Bremner
2021-06-20 20:04 ` Tomi Ollila
2021-06-21 10:07 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).