0
|
1 --TEST--
|
|
2 Bug #10816 Unwanted linebreak at the end of output
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 $eol = "#";
|
|
7 include("Mail/mime.php");
|
|
8 $encoder = new Mail_mime(array('eol'=>$eol));
|
|
9 $encoder->setTXTBody('test');
|
|
10 $encoder->setHTMLBody('<b>test</b>');
|
|
11 $encoder->addAttachment('Just a test', 'application/octet-stream', 'test.txt', false);
|
|
12 $body = $encoder->get();
|
|
13 $taillength = -1 * strlen($eol) * 2;
|
|
14 if (substr($body, $taillength) == ($eol.$eol)){
|
|
15 print("FAILED\n");
|
|
16 print("Body:\n");
|
|
17 print("..." . substr($body, -10) . "\n");
|
|
18 }else{
|
|
19 print("OK\n");
|
|
20 }
|
|
21 --EXPECT--
|
|
22 OK
|
|
23
|