aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-10-26 16:54:12 -0400
committerGravatar David Bremner <bremner@debian.org>2012-10-27 09:32:44 -0300
commite0a223d15656a8a8fd6564687425a7e583f29b61 (patch)
tree5cb209f66a0a7f83fa075f3b5a9097f08d350bf3 /test
parent02cafc84b4540cd0fb878121dcb3551b4ecd9fd1 (diff)
tag: Disallow adding malformed tags to messages
This disallows adding empty tags, since nothing but confusion follows in their wake, and disallows adding tags that begin with "-" because they are also confusing, the tag "-" is impossible to remove using the CLI, and because the syntax for removing such tags conflicts with long argument syntax. This does not place any restrictions on what tags can be removed, as that would make it difficult for people who have the misfortune of already having malformed tags to remove these tags.
Diffstat (limited to 'test')
-rwxr-xr-xtest/tagging4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tagging b/test/tagging
index e4782ed4..980ff927 100755
--- a/test/tagging
+++ b/test/tagging
@@ -46,4 +46,8 @@ 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_expect_code 1 "Empty tag names" 'notmuch tag + One'
+
+test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'
+
test_done