]> git.notmuchmail.org Git - notmuch/commitdiff
test: replace deprecated use of notmuch_database_open_verbose
authorDavid Bremner <david@tethera.net>
Sat, 21 May 2022 18:06:29 +0000 (15:06 -0300)
committerDavid Bremner <david@tethera.net>
Sun, 29 May 2022 10:36:32 +0000 (07:36 -0300)
We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.

test/T560-lib-error.sh
test/T562-lib-database.sh
test/T563-lib-directory.sh
test/T564-lib-query.sh
test/T566-lib-message.sh
test/T568-lib-thread.sh

index 1f4482cbe3d30cadf43ca362aa7f4ea946e22d70..1d45dc7da2bb8fb56516ce760efd840bf6429372 100755 (executable)
@@ -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);
index 2314efd220a2bd79575809094b8fffffa0122848..64233c37f2d0fa930f12ff069c98b7573ecfee4e 100755 (executable)
@@ -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);
index ebd7fcb2d358d3be118d11c40362facbed9547e2..22b9e0b9050c5c5e1de6c125cc1c66f8a2ec2d33 100755 (executable)
@@ -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);
index ff1d49849bc571775d69a9af3d46ddaf89d23cb7..53a63bf61ac29611d390a355e8ddf35f2b3b8f4d 100755 (executable)
@@ -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);
index 8b61d18215af0698803c0c0b4b4fab0762a6f3e4..b6a9e53673c6978f93bd9409bb8b7232c5a019eb 100755 (executable)
@@ -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);
index b45836cdd989ca6ac25bc58bc15f7a13fa38dd63..b4c24ca23b049b4ec8e06a67d28e9d7fb1bae407 100755 (executable)
@@ -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);