X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT570-revision-tracking.sh;h=20b44cbe52943b5f098e552cfe5d2b112e016190;hp=4fff6896dd203b8dbb64760ad31bb3b633c90859;hb=f76d8f82dd004cf14426a91e8a80dcd2a4b97317;hpb=5a3b42fb8c556397841b86c5fda1c4554dab253a diff --git a/test/T570-revision-tracking.sh b/test/T570-revision-tracking.sh index 4fff6896..20b44cbe 100755 --- a/test/T570-revision-tracking.sh +++ b/test/T570-revision-tracking.sh @@ -46,4 +46,31 @@ notmuch tag +a-random-tag-8743632 '*' after=$(notmuch count --lastmod '*' | cut -f3) result=$(($before < $after)) test_expect_equal 1 ${result} + +notmuch count --lastmod '*' | cut -f2 > UUID + +test_expect_success 'search succeeds with correct uuid' \ + "notmuch search --uuid=$(cat UUID) '*'" + +test_expect_success 'uuid works as global option ' \ + "notmuch --uuid=$(cat UUID) search '*'" + +test_expect_code 1 'uuid works as global option II' \ + "notmuch --uuid=this-is-no-uuid search '*'" + +test_expect_code 1 'search fails with incorrect uuid' \ + "notmuch search --uuid=this-is-no-uuid '*'" + +test_expect_success 'show succeeds with correct uuid' \ + "notmuch show --uuid=$(cat UUID) '*'" + +test_expect_code 1 'show fails with incorrect uuid' \ + "notmuch show --uuid=this-is-no-uuid '*'" + +test_expect_success 'tag succeeds with correct uuid' \ + "notmuch tag --uuid=$(cat UUID) +test '*'" + +test_expect_code 1 'tag fails with incorrect uuid' \ + "notmuch tag --uuid=this-is-no-uuid '*' +test2" + test_done