]> granicus.if.org Git - php/commitdiff
fix tests
authorRaghubansh Kumar <kraghuba@php.net>
Mon, 24 Dec 2007 04:26:41 +0000 (04:26 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Mon, 24 Dec 2007 04:26:41 +0000 (04:26 +0000)
ext/standard/tests/strings/sprintf_variation48.phpt
ext/standard/tests/strings/sprintf_variation5.phpt

index df28784eb20aae298453fe31af90ce6a5fea2190..ce7bdf8ae0d23d7f2138f808329b03fef932ca82 100644 (file)
@@ -39,7 +39,7 @@ foreach($resource_values as $resource_value) {
 
 // closing the resources
 fclose($fp);
-fclose($dfp);
+closedir($dfp);
 
 
 echo "Done";
@@ -48,32 +48,32 @@ echo "Done";
 *** Testing sprintf() : scientific formats with resource values ***
 
 -- Iteration 1 --
-string(%d) "%d.000000e+0"
+string(%d) "%f"
 string(1) "e"
-string(%d) "%d.000000e+0"
+string(%d) "%f"
 string(1) "e"
-string(%d) " %d.000000e+0"
-string(%d) "%d.000000e+0 "
-string(%d) "   %d.000000e+0"
+string(%d) " %f"
+string(%d) "%f "
+string(%d) "   %f"
 string(%d) "
-%d.000000e+0"
-string(%d) "%d.000000e+0"
-string(%d) "                   %d.000000e+0"
-string(4) "0-1]"
+%f"
+string(%d) "%f"
+string(%d) "%s%f"
+string(%d) "0-1]"
 string(1) "e"
 
 -- Iteration 2 --
-string(%d) "%d.000000e+0"
+string(%d) "%f"
 string(1) "e"
-string(%d) "%d.000000e+0"
+string(%d) "%f"
 string(1) "e"
-string(%d) " %d.000000e+0"
-string(%d) "%d.000000e+0 "
-string(%d) "   %d.000000e+0"
+string(%d) " %f"
+string(%d) "%f "
+string(%d) "   %f"
 string(%d) "
-%d.000000e+0"
-string(%d) "%d.000000e+0"
-string(%d) "                   %d.000000e+0"
-string(4) "0-1]"
+%f"
+string(%d) "%f"
+string(%d) "%s%f"
+string(%d) "0-1]"
 string(1) "e"
 Done
index b703d749fb767541835eec03b1db373386e423ab..ee13d3d64b3fd6ea19c88efcf1053f6da2500b27 100644 (file)
@@ -12,11 +12,14 @@ echo "*** Testing sprintf() : integer formats with resource values ***\n";
 // resource type variable
 $fp = fopen (__FILE__, "r");
 $dfp = opendir ( dirname(__FILE__) );
+
+$fp_copy = $fp;
+$dfp_copy = $dfp;
   
 // array of resource types
 $resource_types = array (
-  $fp,
-  $dfp
+  $fp_copy,
+  $dfp_copy
 );
 
 // various integer formats
@@ -38,7 +41,7 @@ foreach($resource_types as $res) {
 
 // closing the resources
 fclose($fp);
-fclose($dfp);
+closedir($dfp);
 
 
 echo "Done";
@@ -53,8 +56,8 @@ string(%d) " %d"
 string(%d) "   %d"
 string(%d) "
 %d"
-string(%d) "   %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "0-9]"
 string(1) "d"
 
 -- Iteration 2 --
@@ -64,7 +67,7 @@ string(%d) " %d"
 string(%d) "   %d"
 string(%d) "
 %d"
-string(%d) "   %d"
-string(4) "0-9]"
+string(%d) "%s%d"
+string(%d) "0-9]"
 string(1) "d"
 Done