mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +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);
|
fprintf (stderr, "error opening database: %d\n", stat);
|
||||||
}
|
}
|
||||||
stat = notmuch_database_add_message (db, "/nonexistent", NULL);
|
stat = notmuch_database_add_message (db, "/nonexistent", NULL);
|
||||||
if (stat)
|
if (stat) {
|
||||||
fputs (notmuch_database_status_string (db), stderr);
|
char *status_string = notmuch_database_status_string (db);
|
||||||
|
if (status_string) fputs (status_string, stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
cat <<'EOF' >EXPECTED
|
cat <<'EOF' >EXPECTED
|
||||||
|
|
Loading…
Reference in a new issue