X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT570-revision-tracking.sh;h=aaa45468e5e6fabf3611a351a0dc7f46306fd207;hb=606d9b02e46498874f6c3b5af18467c870e8658b;hp=a59e7c980fc97c7c0fb4658cfe616da63d5a9e15;hpb=040c3236afcf95bead0324a48c2e0b9cd7934993;p=notmuch diff --git a/test/T570-revision-tracking.sh b/test/T570-revision-tracking.sh index a59e7c98..aaa45468 100755 --- a/test/T570-revision-tracking.sh +++ b/test/T570-revision-tracking.sh @@ -19,7 +19,12 @@ int main (int argc, char** argv) unsigned long rev; - stat = notmuch_database_open (argv[1], NOTMUCH_DATABASE_MODE_READ_ONLY, &db); + char* msg = NULL; + stat = notmuch_database_open_with_config (argv[1], + NOTMUCH_DATABASE_MODE_READ_ONLY, + "", NULL, &db, &msg); + if (msg) fputs (msg, stderr); + if (stat) fputs ("open failed\n", stderr); revision = notmuch_database_get_revision (db, &uuid); @@ -90,4 +95,12 @@ subtotal=$(notmuch count lastmod:..$lastmod) result=$(($subtotal == $total-1)) test_expect_equal 1 "$result" +if [ $NOTMUCH_HAVE_SFSEXP -eq 1 ]; then + test_begin_subtest 'exclude one message using negative lastmod (sexp)' + total=$(notmuch count '*') + notmuch tag +${RANDOM} id:4EFC743A.3060609@april.org + count=$(notmuch count --query=sexp '(lastmod -1 *)') + test_expect_equal 1 "$count" +fi + test_done