Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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