X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT562-lib-database.sh;fp=test%2FT562-lib-database.sh;h=e8263a14209341d172b419219bd32e8bdffd6cc7;hp=4e5655e814dbb62b6595001c66499b93851ef17f;hb=be3f4aec3f9006d066fe092e7fe0810c5a0f86e0;hpb=9ab3e2e77d2881004cd2fdc1035dad7052ae735c diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index 4e5655e8..e8263a14 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -238,7 +238,6 @@ A Xapian exception occurred creating a directory: Database has been closed. EOF test_expect_equal_file EXPECTED OUTPUT -# XXX TODO: test with relative path test_begin_subtest "index file with a closed db" cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { @@ -257,4 +256,21 @@ A Xapian exception occurred finding message: Database has been closed. EOF test_expect_equal_file EXPECTED OUTPUT +generate_message '[filename]=relative_path' +test_begin_subtest "index file (relative path)" +test_subtest_known_broken +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 < EXPECTED +== stdout == +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done