imap_8bit_basic.phpt 788 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Test imap_8bit() function : basic functionality
  3. --EXTENSIONS--
  4. imap
  5. --FILE--
  6. <?php
  7. echo "*** Testing imap_8bit() : basic functionality ***\n";
  8. var_dump(imap_8bit("String with CRLF at end \r\n"));
  9. //NB this appears to be a bug in cclient; a space at end of string should be encoded as =20
  10. var_dump(imap_8bit("String with space at end "));
  11. var_dump(imap_8bit("String with tabs \t\t in middle"));
  12. var_dump(imap_8bit("String with tab at end \t"));
  13. var_dump(imap_8bit("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d"));
  14. ?>
  15. --EXPECT--
  16. *** Testing imap_8bit() : basic functionality ***
  17. string(28) "String with CRLF at end=20
  18. "
  19. string(25) "String with space at end "
  20. string(33) "String with tabs =09=09 in middle"
  21. string(26) "String with tab at end =09"
  22. string(27) "=00=01=02=03=04=FE=FF=0A=0D"