cvs: pear /Mail/tests rfc822.phpt

From: Date: Thu, 09 Sep 2004 01:49:00 +0000
Subject: cvs: pear /Mail/tests rfc822.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23738@lists.php.net to get a copy of this message
jon Wed Sep 8 21:49:00 2004 EDT Modified files: /pear/Mail/tests rfc822.phpt Log: Add some tests for the local-part parsing routine. http://cvs.php.net/diff.php/pear/Mail/tests/rfc822.phpt?r1=1.1&r2=1.2&ty=u Index: pear/Mail/tests/rfc822.phpt diff -u pear/Mail/tests/rfc822.phpt:1.1 pear/Mail/tests/rfc822.phpt:1.2 --- pear/Mail/tests/rfc822.phpt:1.1 Wed Sep 8 20:41:15 2004 +++ pear/Mail/tests/rfc822.phpt Wed Sep 8 21:49:00 2004 @@ -14,6 +14,15 @@ $address = 'My Group: "Richard" <richard@localhost> (A comment), ted@example.com (Ted Bloggs), Barney;'; print_r($parser->parseAddressList($address, null, true, true)); +/* A valid address with spaces in the local part. */ +$address = '<"Jon Parise"@php.net>'; +print_r($parser->parseAddressList($address, null, true, true)); + +/* An invalid address with spaces in the local part. */ +$address = '<Jon Parise@php.net>'; +$result = $parser->parseAddressList($address, null, true, true); +if (PEAR::isError($result)) echo $result->getMessage() . "\n"; + --EXPECT-- Array ( @@ -76,3 +85,18 @@ ) ) +Array +( + [0] => stdClass Object + ( + [personal] => + [comment] => Array + ( + ) + + [mailbox] => "Jon Parise" + [host] => php.net + ) + +) +Validation failed for "<Jon Parise@php.net>"

« previous php.pear.cvs (#23738) next »