]> git.notmuchmail.org Git - notmuch/blobdiff - test/T570-revision-tracking.sh
cli/count: add --lastmod
[notmuch] / test / T570-revision-tracking.sh
index e0a57030f404249308bb7a1b17a33b49f10f91c8..4fff6896dd203b8dbb64760ad31bb3b633c90859 100755 (executable)
@@ -34,4 +34,16 @@ UUID 53
 EOF
 test_expect_equal_file EXPECTED CLEAN
 
+grep '^[0-9a-f]' OUTPUT > INITIAL_OUTPUT
+
+test_begin_subtest "output of count matches test code"
+notmuch count --lastmod '*' | cut -f2-3 > OUTPUT
+test_expect_equal_file INITIAL_OUTPUT OUTPUT
+
+test_begin_subtest "modification count increases"
+before=$(notmuch count --lastmod '*' | cut -f3)
+notmuch tag +a-random-tag-8743632 '*'
+after=$(notmuch count --lastmod '*' | cut -f3)
+result=$(($before < $after))
+test_expect_equal 1 ${result}
 test_done