[PATCH 10/10] test: add known broken test for indexing relative path

Subject: [PATCH 10/10] test: add known broken test for indexing relative path

Date: Sat, 18 Jul 2020 12:07:51 -0300

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


The current code seems to look for the path relative to the current
working directory, rather than the mail store root.
---
 test/T562-lib-database.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 6a51002a..c9d7c748 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -251,4 +251,21 @@ A Xapian exception occurred finding message: Database has been closed.
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+generate_message '[filename]=relative_path'
+test_subtest_known_broken
+test_begin_subtest "index file (relative path)"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+    {
+        notmuch_message_t *msg;
+        stat = notmuch_database_index_file (db, "relative_path", NULL, &msg);
+        printf ("%d\n", stat == NOTMUCH_STATUS_SUCCESS);
+    }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+1
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done
-- 
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: