Mercurial > hg > rc1
view vendor/pear/mail_mime/tests/test_Bug_10816_1.phpt @ 45:e11491f625b0
add info action, one 7.3 -> 8.4 nit
| author | Charlie Root |
|---|---|
| date | Thu, 28 Aug 2025 10:40:29 -0400 |
| parents | 1e000243b222 |
| children |
line wrap: on
line source
--TEST-- Bug #10816 Unwanted linebreak at the end of output --SKIPIF-- --FILE-- <?php $eol = "#"; include("Mail/mime.php"); $encoder = new Mail_mime(array('eol'=>$eol)); $encoder->setTXTBody('test'); $encoder->setHTMLBody('<b>test</b>'); $encoder->addAttachment('Just a test', 'application/octet-stream', 'test.txt', false); $body = $encoder->get(); $taillength = -1 * strlen($eol) * 2; if (substr($body, $taillength) == ($eol.$eol)){ print("FAILED\n"); print("Body:\n"); print("..." . substr($body, -10) . "\n"); }else{ print("OK\n"); } --EXPECT-- OK
