mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
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.
This commit is contained in:
parent
9a31cbd386
commit
bbdbc83854
1 changed files with 18 additions and 0 deletions
18
test/tagging
18
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'
|
||||
|
|
Loading…
Reference in a new issue