diff options
| author | David Bremner <david@tethera.net> | 2022-05-21 15:06:31 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-05-29 07:36:59 -0300 |
| commit | eab665c573155237001f42ca3bcefc0f7b9281a5 (patch) | |
| tree | c2f8d537f38f9f44daeede65f53bef65d6b33c6c /test | |
| parent | 32f299fe137a4ac731750d576e65337b395a42ef (diff) | |
test: replace deprecated use of notmuch_database_create
Like notmuch_database_open, we need to conditionally print the error
message.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T560-lib-error.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 470537cc..80527afd 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -60,7 +60,10 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_create ("./nonexistent/foo", &db); + char *msg = NULL; + + stat = notmuch_database_create_with_config ("./nonexistent/foo", "", NULL, &db, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED @@ -99,7 +102,10 @@ test_C <<'EOF' int main (int argc, char** argv) { notmuch_status_t stat; - stat = notmuch_database_create (NULL, NULL); + char *msg; + + stat = notmuch_database_create_with_config (NULL, "", NULL, NULL, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED @@ -117,7 +123,10 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_create (argv[1], &db); + char *msg; + + stat = notmuch_database_create_with_config (argv[1], "", NULL, &db, &msg); + if (msg) fputs (msg, stderr); } EOF cat <<'EOF' >EXPECTED |
