-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1230 from cypht-org/bugfix/multibyte-imap
fix multibyte handling in imap literals and address splitting, improve unit tests
- Loading branch information
Showing
5 changed files
with
88 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ | |
'A5 NOOP' => | ||
"* 23 EXISTS\r\n". | ||
"A5 OK NOOP Completed\r\n", | ||
'A8 UID FETCH 1731,1732 (FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID)])' => | ||
'A8 UID FETCH 1731,1732 (FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID X-SNOOZED)])' => | ||
"* 92 FETCH (UID 1731 FLAGS (\Seen) INTERNALDATE \"02-May-2017 16:32:24 -0500\" RFC822.SIZE 1940 BODY[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID)] {240}\r\n". | ||
"Subject: =?utf-8?q?apt-listchanges=3A_news_for_shop?=\r\n". | ||
"To: [email protected]\r\n". | ||
|
@@ -137,7 +137,7 @@ | |
")\r\n". | ||
"A5 OK Fetch completed (0.001 + 0.000 secs).\r\n", | ||
|
||
'A5 UID FETCH 1731,1732 (FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID)])' => | ||
'A5 UID FETCH 1731,1732 (FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID X-SNOOZED)])' => | ||
"* 92 FETCH (UID 1731 FLAGS (\Seen) INTERNALDATE \"02-May-2017 16:32:24 -0500\" RFC822.SIZE 1940 BODY[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID)] {240}\r\n". | ||
"Subject: =?utf-8?q?apt-listchanges=3A_news_for_shop?=\r\n". | ||
"To: [email protected]\r\n". | ||
|
@@ -194,7 +194,7 @@ | |
"* SEARCH 1680 1682\r\n". | ||
"A5 OK Search completed (0.007 + 0.000 + 0.006 secs).\r\n", | ||
|
||
'A5 UID FETCH 1731 (FLAGS BODY[HEADER])' => | ||
'A5 UID FETCH 1731 (FLAGS INTERNALDATE BODY[HEADER])' => | ||
"* 92 FETCH (UID 1731 FLAGS (\Seen) BODY[HEADER] {623}\r\n". | ||
"Return-path: <[email protected]>\r\n". | ||
"Envelope-to: [email protected]\r\n". | ||
|
@@ -316,4 +316,10 @@ | |
|
||
'A5 COMPRESS DEFLATE' => | ||
"A5 OK DEFLATE active\r\n", | ||
|
||
'A5 TEST MULTIBYTE' => | ||
"A1 OK {12}\r\n". | ||
"Literäääl\r\n". | ||
"A2 OK {7}\r\n". | ||
"Literal\r\n", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,4 +176,14 @@ public function test_process_address_fld() { | |
); | ||
$this->assertEquals($res, process_address_fld('"stuff" foo [email protected] (comment here), bad address <"[email protected]">, good address <[email protected]>, \'[email protected]\' [email protected]')); | ||
} | ||
|
||
/** | ||
* @preserveGlobalState disabled | ||
* @runInSeparateProcess | ||
*/ | ||
public function test_multibyte_addr_split() { | ||
$test = 'Thömas Tester [email protected]'; | ||
$result = addr_split($test); | ||
$this->assertEquals($test, $result[0]); | ||
} | ||
} |
Oops, something went wrong.