diff options
| author | David Bremner <david@tethera.net> | 2015-04-07 21:10:15 +0900 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-04-08 23:43:55 +0900 |
| commit | 294bb6de20de7d9c83a45dca22888d557ece588a (patch) | |
| tree | 5fb55ad3a8a78092d697ccdcd470775183150343 | |
| parent | 2e9ecb611a7f698808add756b2ddcbdfcd8b7c8b (diff) | |
test: move nonexistent directory to something under notmuch's control.
Apparently some systems actually have a directory called /nonexist[ae]nt.
It's hard to fathom a good reason for that, but oh well. As long as we
don't create such a directory inside the notmuch source tree, the new
version should be more robust.
| -rwxr-xr-x | test/T560-lib-error.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 6947aa83..c99b17ed 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -43,13 +43,13 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_open ("/nonexistent/foo", 0, 0); + stat = notmuch_database_open ("./nonexistent/foo", 0, 0); } EOF cat <<'EOF' >EXPECTED == stdout == == stderr == -Error opening database at /nonexistent/foo/.notmuch: No such file or directory +Error opening database at ./nonexistent/foo/.notmuch: No such file or directory EOF test_expect_equal_file EXPECTED OUTPUT @@ -78,13 +78,13 @@ int main (int argc, char** argv) { notmuch_database_t *db; notmuch_status_t stat; - stat = notmuch_database_create ("/nonexistent/foo", &db); + stat = notmuch_database_create ("./nonexistent/foo", &db); } EOF cat <<'EOF' >EXPECTED == stdout == == stderr == -Error: Cannot create database at /nonexistent/foo: No such file or directory. +Error: Cannot create database at ./nonexistent/foo: No such file or directory. EOF test_expect_equal_file EXPECTED OUTPUT @@ -125,7 +125,7 @@ int main (int argc, char** argv) if (stat != NOTMUCH_STATUS_SUCCESS) { 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) { char *status_string = notmuch_database_status_string (db); if (status_string) fputs (status_string, stderr); @@ -135,7 +135,7 @@ EOF cat <<'EOF' >EXPECTED == stdout == == stderr == -Error opening /nonexistent: No such file or directory +Error opening ./nonexistent: No such file or directory EOF test_expect_equal_file EXPECTED OUTPUT |
