diff options
| author | David Bremner <david@tethera.net> | 2017-08-27 15:54:50 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-08-27 15:54:50 -0300 |
| commit | a565f71e1c160431ff99f088bc8fc08d367603a2 (patch) | |
| tree | 2f7c33d7296e15b2c33f6ede436d412c812c3f15 /test/T390-python.sh | |
| parent | 00f87faf4bc19e90e19b8b27c13845efb6a68152 (diff) | |
| parent | 6354745dcd6505c5f12c185a29c25a8d1c240595 (diff) | |
Merge tag 'debian/0.25-6' into debian/stretch-backports
Diffstat (limited to 'test/T390-python.sh')
| -rwxr-xr-x | test/T390-python.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/test/T390-python.sh b/test/T390-python.sh index 4726bc36..a9a61145 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -16,7 +16,7 @@ for t in q_new.search_threads(): print (t.get_thread_id()) EOF notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "compare message ids" test_python <<EOF @@ -28,7 +28,7 @@ for m in q_new.search_messages(): print (m.get_message_id()) EOF notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "get non-existent file" test_python <<EOF @@ -38,4 +38,23 @@ print (db.find_message_by_filename("i-dont-exist")) EOF test_expect_equal "$(cat OUTPUT)" "None" +test_begin_subtest "get revision" +test_python ${MAIL_DIR} <<'EOF' +import notmuch +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY) +(revision, uuid) = db.get_revision() +print ("%s\t%lu" % (uuid, revision)) +EOF +notmuch_uuid_sanitize < OUTPUT > CLEAN +cat <<'EOF' >EXPECTED +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_done |
