This is a bit fragile w.r.t. glib changing their error message, but it
already helped me find one formatting bug, so for now I think it's
worth it, instead of just grepping for "UTF-8".
 test/ | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/ b/test/
index 8b3ef436..11428e8a 100755
--- a/test/
+++ b/test/
@@ -200,5 +200,14 @@ cp initial-config bad-config
 printf '[query]\nq3=from:\xff\n' >>bad-config
 test_expect_code 1 "notmuch --config=./bad-config config list"
+test_begin_subtest "Specific error message about bad utf8"
+notmuch --config=./bad-config config list 2>ERRORS
+GLib: Key file contains key “q3” with value “from:�” which is not UTF-8
+Error: unable to load config file.
+test_expect_equal_file EXPECTED ERRORS

notmuch mailing list --
To unsubscribe send an email to

Reply via email to