X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT568-lib-thread.sh;h=3eb28f3b5be668763189461ac924d85f164a39e2;hb=43406e7d4c081583878ede8f2b5a55f937fa4edd;hp=0f9fa4439235123f54f1548bf722bfe275c28c65;hpb=c5017c76d939610860a64906be77fe62a64eae96;p=notmuch diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index 0f9fa443..3eb28f3b 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -230,5 +230,37 @@ cat < EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "oldest date from closed database" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + time_t stamp; + stamp = notmuch_thread_get_oldest_date (thread); + printf("%d\n%d\n", thread != NULL, stamp > 0); + } +EOF +cat < EXPECTED +== stdout == +1 +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "newest date from closed database" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + time_t stamp; + stamp = notmuch_thread_get_newest_date (thread); + printf("%d\n%d\n", thread != NULL, stamp > 0); + } +EOF +cat < EXPECTED +== stdout == +1 +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done