diff options
| author | David Bremner <david@tethera.net> | 2015-06-05 08:16:17 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-08-14 18:07:55 +0200 |
| commit | 5a3b42fb8c556397841b86c5fda1c4554dab253a (patch) | |
| tree | 0f0e4023f9d5f81c79aa38693f1fe4d51cf1aba7 /test | |
| parent | 98ee460eaa98f1428aecf03dd39fcf314e6f62c0 (diff) | |
cli/count: add --lastmod
In the short term we need a way to get lastmod information e.g. for
the test suite. In the long term we probably want to add lastmod
information to at least the structured output for several other
clients (e.g. show, search).
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T570-revision-tracking.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/T570-revision-tracking.sh b/test/T570-revision-tracking.sh index e0a57030..4fff6896 100755 --- a/test/T570-revision-tracking.sh +++ b/test/T570-revision-tracking.sh @@ -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 |
