summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Fiegehenn <simbabque@cpan.org>2021-10-04 15:58:42 +0100
committerOlaf Alders <olaf@wundersolutions.com>2021-10-19 13:56:19 -0400
commit07983e37699dae0baf7266258653311e2e0c9e27 (patch)
tree6f97cf94cb649e6b45f13e77809261e23210e4c4
parent163418e6b55bc9ca59996c2cdd3515622adf5c9d (diff)
downloaduri-07983e37699dae0baf7266258653311e2e0c9e27.tar.gz
add TODO test about quoted local email part #89
I don't think we can actually make this test pass without implementing a proper email parser. The behaviour that RFC 6068 expects is contrary to the "normal" query escaping. I've chosen to reflect this as a TODO block with a test.
-rw-r--r--t/mailto.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/mailto.t b/t/mailto.t
index 8c68e74..683be92 100644
--- a/t/mailto.t
+++ b/t/mailto.t
@@ -48,4 +48,11 @@ $u = URI->new('mailto:user+detail@example.com');
is $u->to, 'user+detail@example.com', 'subaddress with `+` parsed correctly';
is $u, 'mailto:user+detail@example.com', '... and stringification works';
+TODO: {
+ local $TODO = "We can't handle quoted local parts without properly parsing the email addresses";
+ $u = URI->new('mailto:"foo bar+baz"@example.com');
+ is $u->to, '"foo bar+baz"@example.com', 'address with quoted local part containing spaces is parsed correctly';
+ is $u, 'mailto:%22foo%20bar+baz%22@example.com', '... and stringification works';
+}
+
done_testing;