1 # Copyright (C) 2016 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
6 use_ok 'PublicInbox::Address';
8 is_deeply([qw(e@example.com e@example.org)],
9 [PublicInbox::Address::emails('User <e@example.com>, e@example.org')],
10 'address extraction works as expected');
12 is_deeply([PublicInbox::Address::emails('"ex@example.com" <ex@example.com>')],
13 [qw(ex@example.com)]);
15 my @names = PublicInbox::Address::names(
16 'User <e@e>, e@e, "John A. Doe" <j@d>, <x@x>');
17 is_deeply(['User', 'e', 'John A. Doe', 'x'], \@names,
18 'name extraction works as expected');