summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2025-02-09 22:08:22 +0000
committerArun Isaac2025-02-09 22:08:22 +0000
commit9a82ce70b9eded77a148336feb8913156a31bab8 (patch)
treef0a51a96851be73305db73372f42e53139720479 /tests
parent912384e819c5e57c72a043de326f43356aeef908 (diff)
downloadguile-email-9a82ce70b9eded77a148336feb8913156a31bab8.tar.gz
guile-email-9a82ce70b9eded77a148336feb8913156a31bab8.tar.lz
guile-email-9a82ce70b9eded77a148336feb8913156a31bab8.zip
email: Tolerate square brackets in email addresses.
* email/email.scm (liberal-atext): Add [ and ]. * tests/email.scm ("tolerate email addresses with square brackets in name"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/email.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/email.scm b/tests/email.scm
index dd305b6..972233d 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -1,6 +1,6 @@
;;; guile-email --- Guile email parser
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018, 2019, 2020, 2021, 2023 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019, 2020, 2021, 2023, 2025 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
;;;
;;; This file was adapted from guile-debbugs and is part of guile-email.
@@ -594,6 +594,10 @@ Content-Type: text/plain; charset=utf-8
(parse-email-address "Foo(Bar <foo@example.com>")
'((name . "Foo(Bar") (address . "foo@example.com")))
+(test-equal "tolerate email addresses with square brackets in name"
+ (parse-email-address "Foo [Bar] <foo@example.com>")
+ '((name . "Foo [Bar]") (address . "foo@example.com")))
+
;;;
;;; MIME encoded words