php-src/ext/mailparse/tests/002.phpt
Wez Furlong 6468f8b492 Imported mailparse extension
@- New mailparse extension for parsing and manipulating MIME mail (Wez)
2001-05-20 11:11:28 +00:00

23 lines
415 B
PHP

--TEST--
Check stream encoding
--SKIPIF--
<?php if (!extension_loaded("mailparse")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
$text = <<<EOD
hello, this is some text=hello.
EOD;
$fp = tmpfile();
fwrite($fp, $text);
rewind($fp);
$dest = tmpfile();
mailparse_stream_encode($fp, $dest, "quoted-printable");
rewind($dest);
$data = fread($dest, 2048);
echo $data;
?>
--EXPECT--
hello, this is some text=3Dhello.