- Fixed tests (unicode results, UEXPECT, line endings)

This commit is contained in:
Felipe Pena 2008-06-13 00:18:57 +00:00
parent e4bcc3fb48
commit 7504d57043
18 changed files with 90 additions and 127 deletions

View file

@ -50,7 +50,7 @@ Warning: filter_has_var() expects parameter 2 to be string, array given in %s007
bool(false) bool(false)
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) bool(false)
Warning: filter_has_var() expects parameter 1 to be long, array given in %s007.php on line %d 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 Warning: filter_has_var() expects parameter 1 to be long, array given in %s007.php on line %d
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) bool(false)
Done Done

View file

@ -40,10 +40,10 @@ float(12345.7)
string(29) "<p>string</p>" string(29) "<p>string</p>"
bool(false) 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 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 NULL
Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on line %d Warning: filter_var() expects at most 3 parameters, 5 given in %s011.php on line %d

View file

@ -24,16 +24,16 @@ echo "Done\n";
?> ?>
--EXPECTF-- --EXPECTF--
array(2) { array(2) {
["test1"]=> [u"test1"]=>
int(1) int(1)
["test2"]=> [u"test2"]=>
int(1) int(1)
} }
array(2) { array(2) {
["test1"]=> [u"test1"]=>
int(1) int(1)
["test2"]=> [u"test2"]=>
&string(1) "1" &unicode(1) "1"
} }
string(1) "1" unicode(1) "1"
Done Done

View file

@ -58,9 +58,9 @@ array(0) {
} }
array(2) { array(2) {
[0]=> [0]=>
string(1) "1" unicode(1) "1"
["blah"]=> [u"blah"]=>
string(4) "hoho" unicode(4) "hoho"
} }
bool(false) bool(false)
bool(false) bool(false)
@ -78,16 +78,16 @@ bool(false)
array(0) { array(0) {
} }
array(1) { array(1) {
["var_name"]=> [u"var_name"]=>
NULL NULL
} }
array(1) { array(1) {
["var_name"]=> [u"var_name"]=>
NULL NULL
} }
array(1) { array(1) {
["var_name"]=> [u"var_name"]=>
string(0) "" unicode(0) ""
} }
-- (5) -- (5)
@ -98,20 +98,20 @@ Warning: filter_var_array(): Empty keys are not allowed in the definition array
bool(false) bool(false)
bool(false) bool(false)
array(1) { array(1) {
[""]=> [u""]=>
string(0) "" unicode(0) ""
} }
int(-1) int(-1)
bool(false) bool(false)
array(1) { array(1) {
[""]=> [u""]=>
string(0) "" unicode(0) ""
} }
int(100000) int(100000)
bool(false) bool(false)
array(1) { array(1) {
[""]=> [u""]=>
string(0) "" unicode(0) ""
} }
string(0) "" unicode(0) ""
Done Done

View file

@ -42,45 +42,6 @@ foreach($values as $value) {
--EXPECT-- --EXPECT--
*** Testing image_type_to_mime_type() : usage variations *** *** 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 -- -- Iteration 1 --
unicode(24) "application/octet-stream" unicode(24) "application/octet-stream"

View file

@ -21,12 +21,12 @@ foreach (new RecursiveIteratorIterator($rai) as $t) {
} }
?> ?>
--EXPECTF-- --EXPECTF--
string(1) "z" unicode(1) "z"
object(stdClass)#1 (0) { object(stdClass)#1 (0) {
} }
string(1) "q" unicode(1) "q"
string(1) "s" unicode(1) "s"
Second: Second:
string(1) "z" unicode(1) "z"
string(1) "q" unicode(1) "q"
string(1) "s" unicode(1) "s"

View file

@ -14,3 +14,5 @@ try {
?> ?>
===DONE=== ===DONE===
--EXPECTF-- --EXPECTF--
unicode(29) "Index invalid or out of range"
===DONE===

View file

@ -7,4 +7,4 @@ $a = new SplFastArray('FOO');
?> ?>
--EXPECTF-- --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

View file

@ -40,7 +40,7 @@ try {
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --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 Index invalid or out of range
Index invalid or out of range Index invalid or out of range

View file

@ -16,7 +16,7 @@ var_dump($fo->getRealPath());
?> ?>
==DONE== ==DONE==
--EXPECTF-- --EXPECTF--
string(%d) "%sspl%stests" unicode(%d) "%sspl%stests"
string(19) "fileobject_004.phpt" unicode(19) "fileobject_004.phpt"
string(%d) "%sspl%stests%sfileobject_004.phpt" unicode(%d) "%sspl%stests%sfileobject_004.phpt"
==DONE== ==DONE==

View file

@ -22,7 +22,7 @@ $regexIterator->setMode('foo');
?> ?>
--EXPECTF-- --EXPECTF--
int(0) int(0)
string(14) "Illegal mode 7" unicode(14) "Illegal mode 7"
int(0) 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

View file

@ -23,24 +23,24 @@ var_dump(htmlspecialchars("<>", ENT_COMPAT, str_repeat('a', 100)));
?> ?>
--EXPECTF-- --EXPECTF--
Warning: htmlspecialchars(): charset `1' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `1' not supported, assuming iso-8859-1 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;" unicode(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): charset `12' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `12' not supported, assuming iso-8859-1 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;" unicode(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): charset `125' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `125' not supported, assuming iso-8859-1 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;" unicode(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;" unicode(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
Warning: htmlspecialchars(): charset `12526' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `12526' not supported, assuming iso-8859-1 in %s on line %d
string(35) "&lt;a href='test'&gt;Test&lt;/a&gt;" unicode(35) "&lt;a href='test'&gt;Test&lt;/a&gt;"
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"
Warning: htmlspecialchars(): charset `8666' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `8666' not supported, assuming iso-8859-1 in %s on line %d
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"
Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming iso-8859-1 in %s on line %d Warning: htmlspecialchars(): charset `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' not supported, assuming iso-8859-1 in %s on line %d
string(8) "&lt;&gt;" unicode(8) "&lt;&gt;"

View file

@ -14,21 +14,21 @@ foreach($strings as $string) {
} }
?> ?>
--EXPECT-- --EXPECT--
string(8) "266c743b" unicode(8) "266c743b"
string(8) "266c743b" unicode(8) "266c743b"
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(4) "d090" unicode(4) "d090"
string(4) "d090" unicode(4) "d090"
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(8) "d090d0b0" unicode(8) "d090d0b0"
string(8) "d090d0b0" unicode(8) "d090d0b0"
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(0) "" unicode(0) ""
string(8) "2667743b" unicode(8) "2667743b"
string(8) "2667743b" unicode(8) "2667743b"

View file

@ -9,5 +9,5 @@ mbstring.internal_encoding=pass
var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252'));
?> ?>
--EXPECT-- --EXPECT--
string(28) "&sbquo;&dagger;&trade;&Yuml;" unicode(28) "&sbquo;&dagger;&trade;&Yuml;"
string(32) "&euro;&cent;&pound;&curren;&yen;" unicode(32) "&euro;&cent;&pound;&curren;&yen;"

View file

@ -11,4 +11,4 @@ default_charset=ISO-8859-15
?> ?>
--EXPECT-- --EXPECT--
ISO-8859-15 ISO-8859-15
string(20) "&OElig;&oelig;&Yuml;" unicode(20) "&OElig;&oelig;&Yuml;"

View file

@ -11,4 +11,4 @@ default_charset=ISO-8859-1
?> ?>
--EXPECT-- --EXPECT--
ISO-8859-1 ISO-8859-1
string(18) "&auml;&ouml;&uuml;" unicode(18) "&auml;&ouml;&uuml;"

View file

@ -20,21 +20,21 @@ foreach ($tests as $test) {
} }
?> ?>
--EXPECT-- --EXPECT--
string(3) "abc" unicode(3) "abc"
string(3) "abc" unicode(3) "abc"
string(13) "abc&amp;sfdsa" unicode(13) "abc&amp;sfdsa"
string(13) "abc&amp;sfdsa" unicode(13) "abc&amp;sfdsa"
string(33) "test&#043;s &amp; some more &#68;" unicode(33) "test&#043;s &amp; some more &#68;"
string(33) "test&#043;s &amp; some more &#68;" unicode(33) "test&#043;s &amp; some more &#68;"
string(24) "&; &amp;amp &amp;#a; &9;" unicode(24) "&; &amp;amp &amp;#a; &9;"
string(24) "&; &amp;amp &amp;#a; &9;" unicode(24) "&; &amp;amp &amp;#a; &9;"
string(32) "&amp;kffjadfdhsjfhjasdhffasdfas;" unicode(32) "&amp;kffjadfdhsjfhjasdhffasdfas;"
string(32) "&amp;kffjadfdhsjfhjasdhffasdfas;" unicode(32) "&amp;kffjadfdhsjfhjasdhffasdfas;"
string(16) "&amp;#8787978789" unicode(16) "&amp;#8787978789"
string(16) "&amp;#8787978789" unicode(16) "&amp;#8787978789"
string(5) "&amp;" unicode(5) "&amp;"
string(5) "&amp;" unicode(5) "&amp;"
string(15) "&amp;&amp;&amp;" unicode(15) "&amp;&amp;&amp;"
string(15) "&amp;&amp;&amp;" unicode(15) "&amp;&amp;&amp;"
string(17) "&amp;ab&amp;&amp;" unicode(17) "&amp;ab&amp;&amp;"
string(17) "&amp;ab&amp;&amp;" unicode(17) "&amp;ab&amp;&amp;"