tony2001                Mon Dec 25 11:16:05 2006 UTC

  Modified files:              
    /php-src/ext/standard/tests/strings bug23894.phpt sprintf_f_2.phpt 
                                        sprintf_f_3.phpt sprintf_f.phpt 
  Log:
  fix tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug23894.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/bug23894.phpt
diff -u php-src/ext/standard/tests/strings/bug23894.phpt:1.2 
php-src/ext/standard/tests/strings/bug23894.phpt:1.3
--- php-src/ext/standard/tests/strings/bug23894.phpt:1.2        Tue Jun 20 
19:49:44 2006
+++ php-src/ext/standard/tests/strings/bug23894.phpt    Mon Dec 25 11:16:05 2006
@@ -4,9 +4,9 @@
 <?php
 $a = -12.3456;
 $test = sprintf("%04d", $a);
-var_dump($test, bin2hex($test));
+var_dump($test, bin2hex((binary)$test));
 $test = sprintf("% 13u", $a);
-var_dump($test, bin2hex($test));
+var_dump($test, bin2hex((binary)$test));
 ?>
 --EXPECT--
 string(4) "-012"
@@ -14,7 +14,7 @@
 string(13) "   4294967284"
 string(26) "20202034323934393637323834"
 --UEXPECT--
-string(4) "-012"
+unicode(4) "-012"
 unicode(8) "2d303132"
-string(13) "   4294967284"
+unicode(13) "   4294967284"
 unicode(26) "20202034323934393637323834"
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_f_2.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/sprintf_f_2.phpt
diff -u php-src/ext/standard/tests/strings/sprintf_f_2.phpt:1.2 
php-src/ext/standard/tests/strings/sprintf_f_2.phpt:1.3
--- php-src/ext/standard/tests/strings/sprintf_f_2.phpt:1.2     Mon Dec 18 
11:12:41 2006
+++ php-src/ext/standard/tests/strings/sprintf_f_2.phpt Mon Dec 25 11:16:05 2006
@@ -79,7 +79,6 @@
 var_dump(sprintf("%.3e", $number)); // outputs 3.63e+8
 ?>
 --EXPECT--
-
 string(7) "100.426"
 string(6) "100.43"
 string(3) "100"
@@ -94,7 +93,7 @@
 string(33) "%b = '10100111101010011010101101'"
 string(8) "%c = 'A'"
 string(15) "%d = '43951789'"
-string(17) "%e = '4.39518e+7'"
+string(18) "%e = '4.395179e+7'"
 string(15) "%u = '43951789'"
 string(17) "%u = '4251015507'"
 string(22) "%f = '43951789.000000'"
@@ -112,4 +111,38 @@
 string(12) "[many monke]"
 string(10) "2006-12-18"
 string(6) "123.10"
-string(7) "3.63e+8"
+string(8) "3.625e+8"
+--UEXPECT--
+unicode(7) "100.426"
+unicode(6) "100.43"
+unicode(3) "100"
+unicode(3) "100"
+unicode(3) "144"
+unicode(3) "144"
+unicode(34) "There are 100 monkeys in the world"
+unicode(28) "The 100.1 contains 0 monkeys"
+unicode(30) "The world contains 100 monkeys"
+unicode(76) "The world contains 100 monkeys.
+    That's a nice world full of 100 monkeys."
+unicode(33) "%b = '10100111101010011010101101'"
+unicode(8) "%c = 'A'"
+unicode(15) "%d = '43951789'"
+unicode(18) "%e = '4.395179e+7'"
+unicode(15) "%u = '43951789'"
+unicode(17) "%u = '4251015507'"
+unicode(22) "%f = '43951789.000000'"
+unicode(16) "%o = '247523255'"
+unicode(15) "%s = '43951789'"
+unicode(14) "%x = '29ea6ad'"
+unicode(14) "%X = '29EA6AD'"
+unicode(17) "%+d = '+43951789'"
+unicode(17) "%+d = '-43951789'"
+unicode(8) "[monkey]"
+unicode(12) "[    monkey]"
+unicode(12) "[monkey    ]"
+unicode(12) "[0000monkey]"
+unicode(12) "[####monkey]"
+unicode(12) "[many monke]"
+unicode(10) "2006-12-18"
+unicode(6) "123.10"
+unicode(8) "3.625e+8"
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_f_3.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/sprintf_f_3.phpt
diff -u php-src/ext/standard/tests/strings/sprintf_f_3.phpt:1.2 
php-src/ext/standard/tests/strings/sprintf_f_3.phpt:1.3
--- php-src/ext/standard/tests/strings/sprintf_f_3.phpt:1.2     Mon Dec 18 
11:12:41 2006
+++ php-src/ext/standard/tests/strings/sprintf_f_3.phpt Mon Dec 25 11:16:05 2006
@@ -22,4 +22,10 @@
 string(6) "100,43"
 string(11) "100,426000'"
 string(6) "123,10"
-string(7) "1.23e+2"
+string(8) "1.231e+2"
+--UEXPECT--
+unicode(7) "100,426"
+unicode(6) "100,43"
+unicode(11) "100,426000'"
+unicode(6) "123,10"
+unicode(8) "1.231e+2"
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_f.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/sprintf_f.phpt
diff -u php-src/ext/standard/tests/strings/sprintf_f.phpt:1.2 
php-src/ext/standard/tests/strings/sprintf_f.phpt:1.3
--- php-src/ext/standard/tests/strings/sprintf_f.phpt:1.2       Wed Dec  6 
09:50:28 2006
+++ php-src/ext/standard/tests/strings/sprintf_f.phpt   Mon Dec 25 11:16:05 2006
@@ -38,3 +38,20 @@
 string(7) "-5.6000"
 
 string(105) "1234567%d.0000"
+--UEXPECTF--
+unicode(4) "1.20"
+unicode(4) "1.20"
+unicode(4) "1.20"
+unicode(4) "1.20"
+
+unicode(5) " 3.40"
+unicode(5) "3.40 "
+unicode(5) "03.40"
+unicode(5) "3.400"
+
+unicode(7) "  -5.60"
+unicode(7) "-5.60  "
+unicode(7) "-005.60"
+unicode(7) "-5.6000"
+
+unicode(105) "1234567%d.0000"

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to