diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/imap/tests/imap_8bit_basic.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/imap/tests/imap_8bit_basic.phpt')
-rw-r--r-- | ext/imap/tests/imap_8bit_basic.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/imap/tests/imap_8bit_basic.phpt b/ext/imap/tests/imap_8bit_basic.phpt new file mode 100644 index 0000000..aaa0591 --- /dev/null +++ b/ext/imap/tests/imap_8bit_basic.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test imap_8bit() function : basic functionality +--SKIPIF-- +<?php +extension_loaded('imap') or die('skip imap extension not available in this build'); +?> +--FILE-- +<?php +/* Prototype : string imap_8bit ( string $string ) + * Description: Convert an 8bit string to a quoted-printable string. + * Source code: ext/imap/php_imap.c + */ + +echo "*** Testing imap_8bit() : basic functionality ***\n"; + +var_dump(imap_8bit("String with CRLF at end \r\n")); +//NB this appears to be a bug in cclient; a space at end of string should be encoded as =20 +var_dump(imap_8bit("String with space at end ")); +var_dump(imap_8bit("String with tabs \t\t in middle")); +var_dump(imap_8bit("String with tab at end \t")); +var_dump(imap_8bit("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d")); + +?> +===Done=== +--EXPECT-- +*** Testing imap_8bit() : basic functionality *** +string(28) "String with CRLF at end=20 +" +string(25) "String with space at end " +string(33) "String with tabs =09=09 in middle" +string(26) "String with tab at end =09" +string(27) "=00=01=02=03=04=FE=FF=0A=0D" +===Done=== |