jani Thu Jul 12 17:43:34 2007 UTC
Modified files:
/php-src/ext/standard/tests/strings fprintf.phpt
Log:
fix test
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/fprintf.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/fprintf.phpt
diff -u php-src/ext/standard/tests/strings/fprintf.phpt:1.2
php-src/ext/standard/tests/strings/fprintf.phpt:1.3
--- php-src/ext/standard/tests/strings/fprintf.phpt:1.2 Fri Apr 20 21:17:37 2007
+++ php-src/ext/standard/tests/strings/fprintf.phpt Thu Jul 12 17:43:34 2007
@@ -3,10 +3,9 @@
--SKIPIF--
<?php
-$path = dirname(__FILE__);
-$data_file = "$path/dump.xt";
+$data_file = dirname(__FILE__) . '/dump.txt';
if !($fp = fopen($data_file, 'w')) {
- echo "File dump.txt could not be created, hence exiting from testcase due to
pre-requisite failure\n";
+ die('skip File dump.txt could not be created');
}
?>
@@ -29,7 +28,8 @@
$strings = array( NULL, "abc", 'aaa' );
/* creating dumping file */
-if (!($fp = fopen('dump.txt', 'wt')))
+$data_file = dirname(__FILE__) . '/dump.txt';
+if (!($fp = fopen($data_file, 'wt')))
return;
/* Testing Error Conditions */
@@ -123,10 +123,12 @@
$counter++;
}
-print_r( file_get_contents("dump.txt") );
+fclose($fp);
+
+print_r(file_get_contents($data_file));
echo "\nDone";
-fclose($fp);
+unlink($data_file);
?>
--EXPECTF--
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php