From: Felipe Pena Date: Fri, 13 Jun 2008 00:18:57 +0000 (+0000) Subject: - Fixed tests (unicode results, UEXPECT, line endings) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1528 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7504d570439d5f27e9d1fbf7652d1856ab8b51c7;p=php - Fixed tests (unicode results, UEXPECT, line endings) --- diff --git a/ext/filter/tests/007.phpt b/ext/filter/tests/007.phpt index 96e0b5f18c..76a3737f50 100644 --- a/ext/filter/tests/007.phpt +++ b/ext/filter/tests/007.phpt @@ -50,7 +50,7 @@ Warning: filter_has_var() expects parameter 2 to be string, array given in %s007 bool(false) bool(false) -Warning: filter_has_var() expects parameter 1 to be long, string given in %s007.php on line %d +Warning: filter_has_var() expects parameter 1 to be long, Unicode string given in %s007.php on line %d bool(false) Warning: filter_has_var() expects parameter 1 to be long, array given in %s007.php on line %d @@ -59,6 +59,6 @@ bool(false) Warning: filter_has_var() expects parameter 1 to be long, array given in %s007.php on line %d bool(false) -Warning: filter_has_var() expects parameter 1 to be long, string given in %s007.php on line %d +Warning: filter_has_var() expects parameter 1 to be long, Unicode string given in %s007.php on line %d bool(false) Done diff --git a/ext/filter/tests/011.phpt b/ext/filter/tests/011.phpt index 6a9bf1fa34..b728c72f1a 100644 --- a/ext/filter/tests/011.phpt +++ b/ext/filter/tests/011.phpt @@ -40,10 +40,10 @@ float(12345.7) string(29) "<p>string</p>" bool(false) -Warning: filter_var() expects parameter 2 to be long, string given in %s011.php on line %d +Warning: filter_var() expects parameter 2 to be long, Unicode string given in %s011.php on line %d NULL -Warning: filter_input() expects parameter 3 to be long, string given in %s011.php on line %d +Warning: filter_input() expects parameter 3 to be long, Unicode string given in %s011.php on line %d NULL Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on line %d diff --git a/ext/filter/tests/036.phpt b/ext/filter/tests/036.phpt index 954326661d..4e35a1ea36 100644 --- a/ext/filter/tests/036.phpt +++ b/ext/filter/tests/036.phpt @@ -24,16 +24,16 @@ echo "Done\n"; ?> --EXPECTF-- array(2) { - ["test1"]=> + [u"test1"]=> int(1) - ["test2"]=> + [u"test2"]=> int(1) } array(2) { - ["test1"]=> + [u"test1"]=> int(1) - ["test2"]=> - &string(1) "1" + [u"test2"]=> + &unicode(1) "1" } -string(1) "1" +unicode(1) "1" Done diff --git a/ext/filter/tests/039.phpt b/ext/filter/tests/039.phpt index ae883db3e3..27c91a3142 100644 --- a/ext/filter/tests/039.phpt +++ b/ext/filter/tests/039.phpt @@ -58,9 +58,9 @@ array(0) { } array(2) { [0]=> - string(1) "1" - ["blah"]=> - string(4) "hoho" + unicode(1) "1" + [u"blah"]=> + unicode(4) "hoho" } bool(false) bool(false) @@ -78,16 +78,16 @@ bool(false) array(0) { } array(1) { - ["var_name"]=> + [u"var_name"]=> NULL } array(1) { - ["var_name"]=> + [u"var_name"]=> NULL } array(1) { - ["var_name"]=> - string(0) "" + [u"var_name"]=> + unicode(0) "" } -- (5) @@ -98,20 +98,20 @@ Warning: filter_var_array(): Empty keys are not allowed in the definition array bool(false) bool(false) array(1) { - [""]=> - string(0) "" + [u""]=> + unicode(0) "" } int(-1) bool(false) array(1) { - [""]=> - string(0) "" + [u""]=> + unicode(0) "" } int(100000) bool(false) array(1) { - [""]=> - string(0) "" + [u""]=> + unicode(0) "" } -string(0) "" +unicode(0) "" Done diff --git a/ext/gd/tests/image_type_to_mime_type_variation2.phpt b/ext/gd/tests/image_type_to_mime_type_variation2.phpt index 159e7cf53f..f53a38bd0b 100644 --- a/ext/gd/tests/image_type_to_mime_type_variation2.phpt +++ b/ext/gd/tests/image_type_to_mime_type_variation2.phpt @@ -42,45 +42,6 @@ foreach($values as $value) { --EXPECT-- *** Testing image_type_to_mime_type() : usage variations *** --- Iteration 1 -- -string(24) "application/octet-stream" - --- Iteration 2 -- -string(9) "image/gif" - --- Iteration 3 -- -string(24) "application/octet-stream" - --- Iteration 4 -- -string(24) "application/octet-stream" - --- Iteration 5 -- -string(10) "image/jpeg" - --- Iteration 6 -- -string(10) "image/tiff" - --- Iteration 7 -- -string(24) "application/octet-stream" - --- Iteration 8 -- -string(24) "application/octet-stream" - --- Iteration 9 -- -string(24) "application/octet-stream" - --- Iteration 10 -- -string(9) "image/gif" - --- Iteration 11 -- -string(24) "application/octet-stream" - --- Iteration 12 -- -string(24) "application/octet-stream" -===DONE=== ---UEXPECT-- -*** Testing image_type_to_mime_type() : usage variations *** - -- Iteration 1 -- unicode(24) "application/octet-stream" diff --git a/ext/spl/tests/bug44615.phpt b/ext/spl/tests/bug44615.phpt index 1fd3d199dc..88aa7ab15a 100644 --- a/ext/spl/tests/bug44615.phpt +++ b/ext/spl/tests/bug44615.phpt @@ -21,12 +21,12 @@ foreach (new RecursiveIteratorIterator($rai) as $t) { } ?> --EXPECTF-- -string(1) "z" +unicode(1) "z" object(stdClass)#1 (0) { } -string(1) "q" -string(1) "s" +unicode(1) "q" +unicode(1) "s" Second: -string(1) "z" -string(1) "q" -string(1) "s" +unicode(1) "z" +unicode(1) "q" +unicode(1) "s" diff --git a/ext/spl/tests/fastarray_004.phpt b/ext/spl/tests/fastarray_004.phpt index ff7b0a1ff4..8202c54e0e 100644 --- a/ext/spl/tests/fastarray_004.phpt +++ b/ext/spl/tests/fastarray_004.phpt @@ -14,3 +14,5 @@ try { ?> ===DONE=== --EXPECTF-- +unicode(29) "Index invalid or out of range" +===DONE=== diff --git a/ext/spl/tests/fastarray_009.phpt b/ext/spl/tests/fastarray_009.phpt index daead117cc..a223ef581c 100644 --- a/ext/spl/tests/fastarray_009.phpt +++ b/ext/spl/tests/fastarray_009.phpt @@ -7,4 +7,4 @@ $a = new SplFastArray('FOO'); ?> --EXPECTF-- -Warning: SplFastArray::__construct() expects parameter 1 to be long, string given in %s on line %d +Warning: SplFastArray::__construct() expects parameter 1 to be long, Unicode string given in %s on line %d diff --git a/ext/spl/tests/fastarray_015.phpt b/ext/spl/tests/fastarray_015.phpt index 9f34b63efc..03f5eca2b7 100644 --- a/ext/spl/tests/fastarray_015.phpt +++ b/ext/spl/tests/fastarray_015.phpt @@ -40,7 +40,7 @@ try { echo "Done\n"; ?> --EXPECTF-- -Warning: SplFastArray::__construct() expects parameter 1 to be long, string given in %s on line %d +Warning: SplFastArray::__construct() expects parameter 1 to be long, Unicode string given in %s on line %d Index invalid or out of range Index invalid or out of range Index invalid or out of range diff --git a/ext/spl/tests/fileobject_004.phpt b/ext/spl/tests/fileobject_004.phpt index 02e6725853..e2a3575171 100644 --- a/ext/spl/tests/fileobject_004.phpt +++ b/ext/spl/tests/fileobject_004.phpt @@ -16,7 +16,7 @@ var_dump($fo->getRealPath()); ?> ==DONE== --EXPECTF-- -string(%d) "%sspl%stests" -string(19) "fileobject_004.phpt" -string(%d) "%sspl%stests%sfileobject_004.phpt" +unicode(%d) "%sspl%stests" +unicode(19) "fileobject_004.phpt" +unicode(%d) "%sspl%stests%sfileobject_004.phpt" ==DONE== diff --git a/ext/spl/tests/regexIterator_setMode_error.phpt b/ext/spl/tests/regexIterator_setMode_error.phpt index 52af499d7e..6b46208765 100644 --- a/ext/spl/tests/regexIterator_setMode_error.phpt +++ b/ext/spl/tests/regexIterator_setMode_error.phpt @@ -22,7 +22,7 @@ $regexIterator->setMode('foo'); ?> --EXPECTF-- int(0) -string(14) "Illegal mode 7" +unicode(14) "Illegal mode 7" int(0) -Warning: RegexIterator::setMode() expects parameter 1 to be long, string given in %s on line %d +Warning: RegexIterator::setMode() expects parameter 1 to be long, Unicode string given in %s on line %d diff --git a/ext/standard/tests/strings/bug44703.phpt b/ext/standard/tests/strings/bug44703.phpt index 68468e25e5..9f8d5db7ad 100644 --- a/ext/standard/tests/strings/bug44703.phpt +++ b/ext/standard/tests/strings/bug44703.phpt @@ -23,24 +23,24 @@ var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100))); ?> --EXPECTF-- Warning: htmlspecialchars(): charset `1' not supported, assuming iso-8859-1 in %s on line %d -string(35) "<a href='test'>Test</a>" +unicode(35) "<a href='test'>Test</a>" Warning: htmlspecialchars(): charset `12' not supported, assuming iso-8859-1 in %s on line %d -string(35) "<a href='test'>Test</a>" +unicode(35) "<a href='test'>Test</a>" Warning: htmlspecialchars(): charset `125' not supported, assuming iso-8859-1 in %s on line %d -string(35) "<a href='test'>Test</a>" -string(35) "<a href='test'>Test</a>" +unicode(35) "<a href='test'>Test</a>" +unicode(35) "<a href='test'>Test</a>" Warning: htmlspecialchars(): charset `12526' not supported, assuming iso-8859-1 in %s on line %d -string(35) "<a href='test'>Test</a>" -string(8) "<>" +unicode(35) "<a href='test'>Test</a>" +unicode(8) "<>" Warning: htmlspecialchars(): charset `8666' not supported, assuming iso-8859-1 in %s on line %d -string(8) "<>" -string(8) "<>" -string(8) "<>" -string(8) "<>" +unicode(8) "<>" +unicode(8) "<>" +unicode(8) "<>" +unicode(8) "<>" Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming iso-8859-1 in %s on line %d -string(8) "<>" +unicode(8) "<>" diff --git a/ext/standard/tests/strings/htmlentities-utf.phpt b/ext/standard/tests/strings/htmlentities-utf.phpt index 456508c8f7..9aad7f225f 100755 --- a/ext/standard/tests/strings/htmlentities-utf.phpt +++ b/ext/standard/tests/strings/htmlentities-utf.phpt @@ -14,21 +14,21 @@ foreach($strings as $string) { } ?> --EXPECT-- -string(8) "266c743b" -string(8) "266c743b" -string(0) "" -string(0) "" -string(4) "d090" -string(4) "d090" -string(0) "" -string(0) "" -string(8) "d090d0b0" -string(8) "d090d0b0" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(8) "2667743b" -string(8) "2667743b" +unicode(8) "266c743b" +unicode(8) "266c743b" +unicode(0) "" +unicode(0) "" +unicode(4) "d090" +unicode(4) "d090" +unicode(0) "" +unicode(0) "" +unicode(8) "d090d0b0" +unicode(8) "d090d0b0" +unicode(0) "" +unicode(0) "" +unicode(0) "" +unicode(0) "" +unicode(0) "" +unicode(0) "" +unicode(8) "2667743b" +unicode(8) "2667743b" diff --git a/ext/standard/tests/strings/htmlentities01.phpt b/ext/standard/tests/strings/htmlentities01.phpt index 4ab49472d1..8943a44a27 100644 --- a/ext/standard/tests/strings/htmlentities01.phpt +++ b/ext/standard/tests/strings/htmlentities01.phpt @@ -9,5 +9,5 @@ mbstring.internal_encoding=pass var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); ?> --EXPECT-- -string(28) "‚†™Ÿ" -string(32) "€¢£¤¥" +unicode(28) "‚†™Ÿ" +unicode(32) "€¢£¤¥" diff --git a/ext/standard/tests/strings/htmlentities11.phpt b/ext/standard/tests/strings/htmlentities11.phpt index 62b6aec7c8..c6482c4c79 100644 --- a/ext/standard/tests/strings/htmlentities11.phpt +++ b/ext/standard/tests/strings/htmlentities11.phpt @@ -11,4 +11,4 @@ default_charset=ISO-8859-15 ?> --EXPECT-- ISO-8859-15 -string(20) "ŒœŸ" +unicode(20) "ŒœŸ" diff --git a/ext/standard/tests/strings/htmlentities12.phpt b/ext/standard/tests/strings/htmlentities12.phpt index 826706680d..d19e8e41b9 100644 --- a/ext/standard/tests/strings/htmlentities12.phpt +++ b/ext/standard/tests/strings/htmlentities12.phpt @@ -11,4 +11,4 @@ default_charset=ISO-8859-1 ?> --EXPECT-- ISO-8859-1 -string(18) "äöü" +unicode(18) "äöü" diff --git a/ext/standard/tests/strings/htmlentities18.phpt b/ext/standard/tests/strings/htmlentities18.phpt index ab3df05da8..381cc838ed 100644 --- a/ext/standard/tests/strings/htmlentities18.phpt +++ b/ext/standard/tests/strings/htmlentities18.phpt @@ -20,21 +20,21 @@ foreach ($tests as $test) { } ?> --EXPECT-- -string(3) "abc" -string(3) "abc" -string(13) "abc&sfdsa" -string(13) "abc&sfdsa" -string(33) "test+s & some more D" -string(33) "test+s & some more D" -string(24) "&; &amp &#a; &9;" -string(24) "&; &amp &#a; &9;" -string(32) "&kffjadfdhsjfhjasdhffasdfas;" -string(32) "&kffjadfdhsjfhjasdhffasdfas;" -string(16) "&#8787978789" -string(16) "&#8787978789" -string(5) "&" -string(5) "&" -string(15) "&&&" -string(15) "&&&" -string(17) "&ab&&" -string(17) "&ab&&" +unicode(3) "abc" +unicode(3) "abc" +unicode(13) "abc&sfdsa" +unicode(13) "abc&sfdsa" +unicode(33) "test+s & some more D" +unicode(33) "test+s & some more D" +unicode(24) "&; &amp &#a; &9;" +unicode(24) "&; &amp &#a; &9;" +unicode(32) "&kffjadfdhsjfhjasdhffasdfas;" +unicode(32) "&kffjadfdhsjfhjasdhffasdfas;" +unicode(16) "&#8787978789" +unicode(16) "&#8787978789" +unicode(5) "&" +unicode(5) "&" +unicode(15) "&&&" +unicode(15) "&&&" +unicode(17) "&ab&&" +unicode(17) "&ab&&" diff --git a/ext/standard/tests/strings/substr.phpt b/ext/standard/tests/strings/substr.phpt index eda3f4c808..9197ab5cc7 100644 Binary files a/ext/standard/tests/strings/substr.phpt and b/ext/standard/tests/strings/substr.phpt differ