From: David Bremner Date: Tue, 25 Dec 2012 19:42:42 +0000 (-0400) Subject: test/tagging: add basic tests for batch tagging functionality X-Git-Tag: 0.15_rc1~18 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=e77a99f44e47951bb1a0bb2d8a5840f8cfabac3d test/tagging: add basic tests for batch tagging functionality This tests argument parsing, blank lines and comments, and basic hex decoding functionality. --- diff --git a/test/tagging b/test/tagging index cd16585d..405ad7cd 100755 --- a/test/tagging +++ b/test/tagging @@ -46,6 +46,57 @@ test_expect_equal "$output" "\ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 unread) thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)" +test_begin_subtest "--batch" +notmuch tag --batch < batch.in < batch.expected < backup.tags +notmuch tag --input=batch.in +notmuch search \* | notmuch_search_sanitize > OUTPUT +notmuch restore --format=batch-tag < backup.tags +test_expect_equal_file batch.expected OUTPUT + +test_begin_subtest "--batch --input" +notmuch dump --format=batch-tag > backup.tags +notmuch tag --batch --input=batch.in +notmuch search \* | notmuch_search_sanitize > OUTPUT +notmuch restore --format=batch-tag < backup.tags +test_expect_equal_file batch.expected OUTPUT + +test_begin_subtest "--batch, blank lines and comments" +notmuch dump | sort > EXPECTED +notmuch tag --batch < OUTPUT +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest '--batch: checking error messages' notmuch dump --format=batch-tag > BACKUP notmuch tag --batch <OUTPUT