diff options
author | David Bremner <bremner@debian.org> | 2012-12-25 15:42:44 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-01-07 20:49:00 -0400 |
commit | bbdbc838547667c880ee38d017f751ebe5da49ab (patch) | |
tree | 7a8fdfe2cf8b526d663bc118e73a3759580d7ff7 /test | |
parent | 9a31cbd3867b286fb7c26533d1d8589d49e879cc (diff) |
test/tagging: add test for exotic message-ids and batch tagging
The (now fixed) bug that this test revealed is that unquoted
message-ids with whitespace or other control characters in them are
split into several tokens by the Xapian query parser.
Diffstat (limited to 'test')
-rwxr-xr-x | test/tagging | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/tagging b/test/tagging index 417112b8..1717e720 100755 --- a/test/tagging +++ b/test/tagging @@ -198,6 +198,24 @@ notmuch dump --format=batch-tag | sort > OUTPUT notmuch restore --format=batch-tag < BACKUP test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest '--batch: unicode message-ids' + +${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} \ + --num-messages=100 + +notmuch dump --format=batch-tag | sed 's/^.* -- /+common_tag -- /' | \ + sort > EXPECTED + +notmuch dump --format=batch-tag | sed 's/^.* -- / -- /' | \ + notmuch restore --format=batch-tag + +notmuch tag --batch < EXPECTED + +notmuch dump --format=batch-tag| \ + sort > OUTPUT + +test_expect_equal_file EXPECTED OUTPUT + test_expect_code 1 "Empty tag names" 'notmuch tag + One' test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One' |