aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/disposition.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/disposition.c b/test/unit/disposition.c
index 47e2f4eb..92de9181 100644
--- a/test/unit/disposition.c
+++ b/test/unit/disposition.c
@@ -35,9 +35,20 @@ struct testcase cases[] = {
{ "attachment; filename=\"foo", "attachment", NULL },
{ "attachment; filename= ", "attachment", NULL },
{ "attachment; filename=\"", "attachment", NULL },
+ { "attachment; filename=\"\"", "attachment", NULL },
+ { "attachment; filename=\"a\"", "attachment", "a" },
{ "attachment; filename=\"foo", "attachment", NULL },
{ "attachment; filename=~/foo", "attachment", "__foo" },
+ /* Note that due to the rules for implied linear whitespace (Section 2.1 of
+ * [RFC2616]), OPTIONAL whitespace can appear between words (token or
+ * quoted-string) and separator characters. */
+ { "attachment ; filename=foo", "attachment", "foo" },
+ { "attachment; filename =foo", "attachment", "foo" },
+ { "attachment; filename= foo", "attachment", "foo" },
+ { "attachment; filename = foo", "attachment", "foo" },
+ { "attachment ; filename = foo", "attachment", "foo" },
+
/* See http://test.greenbytes.de/tech/tc2231/ */
{ "inline", "inline", NULL },
{ "\"inline\"", NULL, NULL },