mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
test: make one error output test more robust.
Since notmuch_database_status_string can return NULL, passing it directly to fputs is not a good idea.
This commit is contained in:
parent
6a99505625
commit
703c8f9511
1 changed files with 4 additions and 3 deletions
|
@ -126,9 +126,10 @@ int main (int argc, char** argv)
|
|||
fprintf (stderr, "error opening database: %d\n", stat);
|
||||
}
|
||||
stat = notmuch_database_add_message (db, "/nonexistent", NULL);
|
||||
if (stat)
|
||||
fputs (notmuch_database_status_string (db), stderr);
|
||||
|
||||
if (stat) {
|
||||
char *status_string = notmuch_database_status_string (db);
|
||||
if (status_string) fputs (status_string, stderr);
|
||||
}
|
||||
}
|
||||
EOF
|
||||
cat <<'EOF' >EXPECTED
|
||||
|
|
Loading…
Reference in a new issue