3 # Tests to make sure the regexp engine doesn't run into limits too soon.
16 (?<address> (?&mailbox) | (?&group))
17 (?<mailbox> (?&name_addr) | (?&addr_spec))
18 (?<name_addr> (?&display_name)? (?&angle_addr))
19 (?<angle_addr> (?&CFWS)? < (?&addr_spec) > (?&CFWS)?)
20 (?<group> (?&display_name) : (?:(?&mailbox_list) | (?&CFWS))? ;
22 (?<display_name> (?&phrase))
23 (?<mailbox_list> (?&mailbox) (?: , (?&mailbox))*)
25 (?<addr_spec> (?&local_part) \@ (?&domain))
26 (?<local_part> (?&dot_atom) | (?"ed_string))
27 (?<domain> (?&dot_atom) | (?&domain_literal))
28 (?<domain_literal> (?&CFWS)? \[ (?: (?&FWS)? (?&dcontent))* (?&FWS)?
30 (?<dcontent> (?&dtext) | (?"ed_pair))
31 (?<dtext> (?&NO_WS_CTL) | [\x21-\x5a\x5e-\x7e])
33 (?<atext> (?&ALPHA) | (?&DIGIT) | [-!#\$%&'*+/=?^_`{|}~])
34 (?<atom> (?&CFWS)? (?&atext)+ (?&CFWS)?)
35 (?<dot_atom> (?&CFWS)? (?&dot_atom_text) (?&CFWS)?)
36 (?<dot_atom_text> (?&atext)+ (?: \. (?&atext)+)*)
38 (?<text> [\x01-\x09\x0b\x0c\x0e-\x7f])
39 (?<quoted_pair> \\ (?&text))
41 (?<qtext> (?&NO_WS_CTL) | [\x21\x23-\x5b\x5d-\x7e])
42 (?<qcontent> (?&qtext) | (?"ed_pair))
43 (?<quoted_string> (?&CFWS)? (?&DQUOTE) (?:(?&FWS)? (?&qcontent))*
44 (?&FWS)? (?&DQUOTE) (?&CFWS)?)
46 (?<word> (?&atom) | (?"ed_string))
50 (?<FWS> (?: (?&WSP)* (?&CRLF))? (?&WSP)+)
51 (?<ctext> (?&NO_WS_CTL) | [\x21-\x27\x2a-\x5b\x5d-\x7e])
52 (?<ccontent> (?&ctext) | (?"ed_pair) | (?&comment))
53 (?<comment> \( (?: (?&FWS)? (?&ccontent))* (?&FWS)? \) )
54 (?<CFWS> (?: (?&FWS)? (?&comment))*
55 (?: (?:(?&FWS)? (?&comment)) | (?&FWS)))
57 # No whitespace control
58 (?<NO_WS_CTL> [\x01-\x08\x0b\x0c\x0e-\x1f\x7f])
70 run_tests() unless caller;
73 # rewinding DATA is necessary with PERLIO=stdio when this
74 # test is run from another thread
76 while (<DATA>) { last if /^__DATA__/ }
80 like($_, qr/^$email$/, $_);
86 1; # Because reg_email_thr.t will (indirectly) require this script.
89 # Acme::MetaSyntactic ++
92 Jeff_Tracy@thunderbirds.org
93 "Lady Penelope"@thunderbirds.org
94 "The\ Hood"@thunderbirds.org
95 fred @ flintstones.net
96 barney (rubble) @ flintstones.org
97 bammbamm (bam! bam! (bam! bam! (bam!)) bam!) @ flintstones.org
98 Michelangelo@[127.0.0.1]
99 Donatello @ [127.0.0.1]
100 Raphael (He as well) @ [127.0.0.1]
101 "Leonardo" @ [127.0.0.1]
102 Barbapapa <barbapapa @ barbapapa.net>
103 "Barba Mama" <barbamama @ [127.0.0.1]>
104 Barbalala (lalalalalalalala) <barbalala (Yes, her!) @ (barba) barbapapa.net>