aboutsummaryrefslogtreecommitdiff
path: root/test/T560-lib-error.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-29 21:01:30 -0300
committerDavid Bremner <david@tethera.net>2020-08-01 20:27:30 -0300
commit99a7aac8f2af6f3adb8f816be46ee33eb1d57515 (patch)
tree4e56050b876b601164bfbf4e5436447493d4b738 /test/T560-lib-error.sh
parent29a58ecf4a8859766861170cd6f7adec9441edea (diff)
test: drop use of db_ending
This will allow the dropping of the test for the default ending from configure.
Diffstat (limited to 'test/T560-lib-error.sh')
-rwxr-xr-xtest/T560-lib-error.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 70df292a..260ac120 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -211,8 +211,7 @@ int main (int argc, char** argv)
fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
exit (1);
}
- path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.${db_ending}", argv[1]);
- fd = open(path,O_WRONLY|O_TRUNC);
+ fd = open(argv[2],O_WRONLY|O_TRUNC);
if (fd < 0) {
fprintf (stderr, "error opening %s\n", argv[1]);
exit (1);
@@ -228,9 +227,10 @@ cat <<'EOF' > c_tail
}
EOF
+POSTLIST_PATH=(${MAIL_DIR}/.notmuch/xapian/postlist.*)
backup_database
test_begin_subtest "Xapian exception finding message"
-cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${POSTLIST_PATH}
{
notmuch_message_t *message = NULL;
stat = notmuch_database_find_message (db, "id:nonexistent", &message);
@@ -247,7 +247,7 @@ restore_database
backup_database
test_begin_subtest "Xapian exception getting tags"
-cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${POSTLIST_PATH}
{
notmuch_tags_t *tags = NULL;
tags = notmuch_database_get_all_tags (db);
@@ -265,7 +265,7 @@ restore_database
backup_database
test_begin_subtest "Xapian exception creating directory"
-cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${POSTLIST_PATH}
{
notmuch_directory_t *directory = NULL;
stat = notmuch_database_get_directory (db, "none/existing", &directory);
@@ -282,7 +282,7 @@ restore_database
backup_database
test_begin_subtest "Xapian exception searching messages"
-cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${POSTLIST_PATH}
{
notmuch_messages_t *messages = NULL;
notmuch_query_t *query=notmuch_query_create (db, "*");
@@ -301,7 +301,7 @@ restore_database
backup_database
test_begin_subtest "Xapian exception counting messages"
-cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${POSTLIST_PATH}
{
int count;
notmuch_query_t *query=notmuch_query_create (db, "id:87ocn0qh6d.fsf@yoom.home.cworth.org");