test: replace deprecated use of notmuch_database_open_verbose

We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
This commit is contained in:
David Bremner 2022-05-21 15:06:29 -03:00
parent ae1fc657ef
commit f6e7a9dde5
6 changed files with 18 additions and 6 deletions

View file

@ -206,7 +206,9 @@ int main (int argc, char** argv)
char *msg = NULL;
int fd;
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);

View file

@ -17,7 +17,9 @@ int main (int argc, char** argv)
notmuch_status_t stat = NOTMUCH_STATUS_SUCCESS;
char *msg = NULL;
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);

View file

@ -18,7 +18,9 @@ int main (int argc, char** argv)
notmuch_status_t stat = NOTMUCH_STATUS_SUCCESS;
char *msg = NULL;
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);

View file

@ -17,7 +17,9 @@ int main (int argc, char** argv)
notmuch_status_t stat;
char *msg = NULL;
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);

View file

@ -29,7 +29,9 @@ int main (int argc, char** argv)
notmuch_message_t *message = NULL;
const char *id = "1258471718-6781-1-git-send-email-dottedmag@dottedmag.net";
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);

View file

@ -36,7 +36,9 @@ int main (int argc, char** argv)
notmuch_query_t *query = NULL;
const char *id = "${THREAD}";
stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
stat = notmuch_database_open_with_config (argv[1],
NOTMUCH_DATABASE_MODE_READ_WRITE,
NULL, NULL, &db, &msg);
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);