xref: /PHP-8.0/ext/imap/tests/imap_8bit_basic.phpt (revision b5c7a83d)
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
9echo "*** Testing imap_8bit() : basic functionality ***\n";
10
11var_dump(imap_8bit("String with CRLF at end \r\n"));
12//NB this appears to be a bug in cclient; a space at end of string should be encoded as =20
13var_dump(imap_8bit("String with space at end "));
14var_dump(imap_8bit("String with tabs \t\t in middle"));
15var_dump(imap_8bit("String with tab at end \t"));
16var_dump(imap_8bit("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d"));
17
18?>
19--EXPECT--
20*** Testing imap_8bit() : basic functionality ***
21string(28) "String with CRLF at end=20
22"
23string(25) "String with space at end "
24string(33) "String with tabs =09=09 in middle"
25string(26) "String with tab at end =09"
26string(27) "=00=01=02=03=04=FE=FF=0A=0D"
27