Annotation of embedaddon/php/ext/imap/tests/imap_8bit_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test imap_8bit() function : basic functionality
! 3: --SKIPIF--
! 4: <?php
! 5: extension_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:
! 14: echo "*** Testing imap_8bit() : basic functionality ***\n";
! 15:
! 16: var_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
! 18: var_dump(imap_8bit("String with space at end "));
! 19: var_dump(imap_8bit("String with tabs \t\t in middle"));
! 20: var_dump(imap_8bit("String with tab at end \t"));
! 21: var_dump(imap_8bit("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d"));
! 22:
! 23: ?>
! 24: ===Done===
! 25: --EXPECT--
! 26: *** Testing imap_8bit() : basic functionality ***
! 27: string(28) "String with CRLF at end=20
! 28: "
! 29: string(25) "String with space at end "
! 30: string(33) "String with tabs =09=09 in middle"
! 31: string(26) "String with tab at end =09"
! 32: string(27) "=00=01=02=03=04=FE=FF=0A=0D"
! 33: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>