xref: /PHP-5.3/ext/imap/tests/imap_8bit_basic.phpt (revision b8a79234)
1--TEST--
2Test imap_8bit() function : basic functionality
3--SKIPIF--
4<?php
5extension_loaded('imap') or die('skip imap extension not available in this build');
6?>
7--FILE--
8<?php
9/* Prototype  : string imap_8bit  ( string $string  )
10 * Description: Convert an 8bit string to a quoted-printable string.
11 * Source code: ext/imap/php_imap.c
12 */
13
14echo "*** Testing imap_8bit() : basic functionality ***\n";
15
16var_dump(imap_8bit("String with CRLF at end \r\n"));
17//NB this appears to be a bug in cclient; a space at end of string should be encoded as =20
18var_dump(imap_8bit("String with space at end "));
19var_dump(imap_8bit("String with tabs \t\t in middle"));
20var_dump(imap_8bit("String with tab at end \t"));
21var_dump(imap_8bit("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d"));
22
23?>
24===Done===
25--EXPECT--
26*** Testing imap_8bit() : basic functionality ***
27string(28) "String with CRLF at end=20
28"
29string(25) "String with space at end "
30string(33) "String with tabs =09=09 in middle"
31string(26) "String with tab at end =09"
32string(27) "=00=01=02=03=04=FE=FF=0A=0D"
33===Done===
34