annotate vendor/pear/mail_mime/tests/test_Bug_21206.phpt @ 43:771f6803cc4b default tip

somehow lost the correctly updated metadata so e.g. 'mail' package wasn't being imported
author Charlie Root
date Sun, 26 Jan 2025 13:13:49 -0500
parents 1e000243b222
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
1 --TEST--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
2 Bug #21206 Handling quoted strings
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
3 --SKIPIF--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
4 --FILE--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
5 <?php
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
6 require_once('Mail/mimePart.php');
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
7 class X extends Mail_mimePart {
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
8 public static function explodeQuotedString($delimiter, $string){
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
9 return Mail_mimePart::explodeQuotedString($delimiter, $string);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
10 }
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
11 }
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
12
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
13 $tests = [
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
14 '"a" <a@a.a>, b <b@b.b>',
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
15 '"c\\\\" <c@c.c>, d <d@d.d>',
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
16 ];
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
17 foreach ($tests as $test) {
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
18 $addrs = X::explodeQuotedString('[\t,]', $test);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
19 foreach ($addrs as $addr) {
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
20 print trim($addr) . PHP_EOL;
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
21 }
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
22 }
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
23 ?>
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
24 --EXPECT--
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
25 "a" <a@a.a>
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
26 b <b@b.b>
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
27 "c\\" <c@c.c>
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
28 d <d@d.d>