]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: test-imap-utf7 - Improve/clarify testing '&'
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 13 Jan 2021 17:17:18 +0000 (19:17 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 3 Feb 2021 09:04:22 +0000 (09:04 +0000)
& is never base64-encoded.

src/lib-imap/test-imap-utf7.c

index 96a17913c8fb2b4821070047e328e9a606a66c8d..315b19d4324afd88696ffa61c770ea7db3fdf631 100644 (file)
@@ -15,12 +15,12 @@ static void test_imap_utf7_by_example(void)
                { "&&x&&", "&-&-x&-&-" },
                { "~peter/mail/\xe5\x8f\xb0\xe5\x8c\x97/\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e",
                  "~peter/mail/&U,BTFw-/&ZeVnLIqe-" },
-               { "tiet\xc3\xa4j\xc3\xa4", "tiet&AOQ-j&AOQ-" },
+               { "tiet\xc3\xa4&j\xc3\xa4&", "tiet&AOQ-&-j&AOQ-&-" }, /* & is always encoded as &- */
                { "p\xe4\xe4", NULL },
                { NULL, "&" },
                { NULL, "&Jjo" },
                { NULL, "&Jjo!" },
-               { NULL, "&U,BTFw-&ZeVnLIqe-" }
+               { NULL, "&U,BTFw-&ZeVnLIqe-" } /* unnecessary shift */
        };
        string_t *dest;
        unsigned int i;