moriyoshi Thu Oct 24 17:11:41 2002 EDT Added files: /php4/ext/standard/tests/strings htmlentities1.phpt htmlentities2.phpt htmlentities3.phpt htmlentities4.phpt htmlentities5.phpt htmlentities6.phpt htmlentities7.phpt htmlentities8.phpt htmlentities9.phpt Log: Added new test cases for htmlentities
Index: php4/ext/standard/tests/strings/htmlentities1.phpt +++ php4/ext/standard/tests/strings/htmlentities1.phpt --TEST-- htmlentities() test 1 (cp1252) --INI-- mbstring.internal_encoding=pass --FILE-- <?php var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, 'cp1252')); var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); ?> --EXPECT-- string(28) "‚†™Ÿ" string(32) "€¢£¤¥" Index: php4/ext/standard/tests/strings/htmlentities2.phpt +++ php4/ext/standard/tests/strings/htmlentities2.phpt --TEST-- htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) --SKIPIF-- <?php setlocale( LC_CTYPE, "fr_FR.ISO-8859-15" ) or die( "skip\n" ); ?> --INI-- mbstring.internal_encoding=pass --FILE-- <?php setlocale( LC_CTYPE, "fr_FR.ISO-8859-15" ); var_dump(htmlentities("\xbc\xbd\xbe", ENT_QUOTES, '')); ?> --EXPECT-- string(20) "ŒœŸ" Index: php4/ext/standard/tests/strings/htmlentities3.phpt +++ php4/ext/standard/tests/strings/htmlentities3.phpt --TEST-- htmlentities() test 3 (setlocale / de_DE.ISO-8859-1) --SKIPIF-- <?php setlocale( LC_CTYPE, "de_DE.ISO-8859-1" ) or die("skip\n"); ?> --INI-- mbstring.internal_encoding=pass --FILE-- <?php setlocale( LC_CTYPE, "de_DE.ISO-8859-1" ); var_dump(htmlentities("\xe4\xf6\xfc", ENT_QUOTES, '')); ?> --EXPECT-- string(18) "äöü" Index: php4/ext/standard/tests/strings/htmlentities4.phpt +++ php4/ext/standard/tests/strings/htmlentities4.phpt --TEST-- htmlentities() test 4 (setlocale / ja_JP.EUC-JP) --SKIPIF-- <?php setlocale( LC_CTYPE, "ja_JP.EUC-JP" ) or die("skip\n"); ?> --INI-- mbstring.internal_encoding=pass --FILE-- <?php setlocale( LC_CTYPE, "ja_JP.EUC-JP" ); var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); ?> --EXPECT-- string(6) "、。," Index: php4/ext/standard/tests/strings/htmlentities5.phpt +++ php4/ext/standard/tests/strings/htmlentities5.phpt --TEST-- htmlentities() test 5 (mbstring / cp1252) --INI-- output_handler= mbstring.internal_encoding=cp1252 --SKIPIF-- <?php function_exists('mb_internal_encoding') or die("skip\n"); ?> --FILE-- <?php print mb_internal_encoding()."\n"; var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '')); var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, '')); ?> --EXPECT-- Windows-1252 string(28) "‚†™Ÿ" string(32) "€¢£¤¥" Index: php4/ext/standard/tests/strings/htmlentities6.phpt +++ php4/ext/standard/tests/strings/htmlentities6.phpt --TEST-- htmlentities() test 6 (mbstring / ISO-8859-15) --INI-- output_handler= mbstring.internal_encoding=ISO-8859-15 --SKIPIF-- <?php function_exists('mb_internal_encoding') or die("skip\n"); ?> --FILE-- <?php print mb_internal_encoding()."\n"; var_dump(htmlentities("\xbc\xbd\xbe", ENT_QUOTES, '')); ?> --EXPECT-- ISO-8859-15 string(20) "ŒœŸ" Index: php4/ext/standard/tests/strings/htmlentities7.phpt +++ php4/ext/standard/tests/strings/htmlentities7.phpt --TEST-- htmlentities() test 7 (mbstring / ISO-8859-1) --INI-- output_handler= mbstring.internal_encoding=ISO-8859-1 --SKIPIF-- <?php function_exists('mb_internal_encoding') or die("skip\n"); ?> --FILE-- <?php print mb_internal_encoding()."\n"; var_dump(htmlentities("\xe4\xf6\xfc", ENT_QUOTES, '')); ?> --EXPECT-- ISO-8859-1 string(18) "äöü" Index: php4/ext/standard/tests/strings/htmlentities8.phpt +++ php4/ext/standard/tests/strings/htmlentities8.phpt --TEST-- htmlentities() test 8 (mbstring / EUC-JP) --INI-- output_handler= mbstring.internal_encoding=EUC-JP --SKIPIF-- <?php function_exists('mb_internal_encoding') or die("skip\n"); ?> --FILE-- <?php print mb_internal_encoding()."\n"; var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); ?> --EXPECT-- EUC-JP string(6) "、。," Index: php4/ext/standard/tests/strings/htmlentities9.phpt +++ php4/ext/standard/tests/strings/htmlentities9.phpt --TEST-- htmlentities() test 9 (mbstring / Shift_JIS) --INI-- output_handler= mbstring.internal_encoding=Shift_JIS --SKIPIF-- <?php function_exists('mb_internal_encoding') or die("skip\n"); ?> --FILE-- <?php print mb_internal_encoding()."\n"; var_dump(htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, '')); ?> --EXPECT-- SJIS string(6) "ABC" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php