summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/disk_total_space_variation.phpt
diff options
context:
space:
mode:
authorAnt Phillips <ant@php.net>2008-12-30 16:38:17 +0000
committerAnt Phillips <ant@php.net>2008-12-30 16:38:17 +0000
commit4d3f948495345c9444ab3b0cb02e10d568405e71 (patch)
tree4c5077c1d8a6dbc450bc47d8a42ae676f11cbba3 /ext/standard/tests/file/disk_total_space_variation.phpt
parentf9f5039988108236c31e3bd5d42dcff02933382d (diff)
downloadphp-git-4d3f948495345c9444ab3b0cb02e10d568405e71.tar.gz
Revert to the previous version for these tests as they were overwritten by mistake (checked on Windows but not on Linux... so the six skipped tests may not work correctly... but they should be ok and I'll watch the test results).
Diffstat (limited to 'ext/standard/tests/file/disk_total_space_variation.phpt')
-rw-r--r--ext/standard/tests/file/disk_total_space_variation.phpt47
1 files changed, 27 insertions, 20 deletions
diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt
index 6cd96cd872..c03ba594bd 100644
--- a/ext/standard/tests/file/disk_total_space_variation.phpt
+++ b/ext/standard/tests/file/disk_total_space_variation.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test disk_total_space() functions : usage variations
+Testing disk_total_space() functions : Usage Variations.
--FILE--
<?php
/*
@@ -18,9 +18,9 @@ echo "\nTesting for the return type ***\n";
$return_value = disk_total_space($file_path);
var_dump( is_float($return_value) );
-echo "\n*** Testing disk_total_space() function with different directory combinations ***";
-
+echo "\n*** Testing with different directory combinations ***";
$dir = "/disk_total_space";
+
mkdir($file_path.$dir);
$dirs_arr = array(
@@ -29,7 +29,7 @@ $dirs_arr = array(
$file_path."/.".$dir,
/* Testing a file trailing slash */
- $file_path.$dir."/",
+ $file_path."".$dir."/",
$file_path."/.".$dir."/",
/* Testing file with double trailing slashes */
@@ -44,6 +44,7 @@ $dirs_arr = array(
".".chr(0).$file_path.$dir.chr(0)
);
+
$count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir1) {
@@ -52,57 +53,63 @@ foreach($dirs_arr as $dir1) {
$count++;
}
+echo "*** Testing with Binary Input ***\n";
+var_dump( disk_total_space(b"$file_path") );
+
echo"\n--- Done ---";
?>
--CLEAN--
<?php
$file_path = dirname(__FILE__);
-$dir = "/disk_total_space";
-rmdir($file_path.$dir);
+rmdir($file_path."/disk_total_space");
?>
+
+
--EXPECTF--
*** Testing with a directory ***
-float(%f)
+float(%d)
Testing for the return type ***
bool(true)
-*** Testing disk_total_space() function with different directory combinations ***
+*** Testing with different directory combinations ***
-- Iteration 1 --
-float(%f)
+float(%d)
-- Iteration 2 --
-float(%f)
+float(%d)
-- Iteration 3 --
-float(%f)
+float(%d)
-- Iteration 4 --
-float(%f)
+float(%d)
-- Iteration 5 --
-float(%f)
+float(%d)
-- Iteration 6 --
-float(%f)
+float(%d)
-- Iteration 7 --
-float(%f)
+float(%d)
-- Iteration 8 --
-float(%f)
+float(%d)
-- Iteration 9 --
-float(%f)
+float(%d)
-- Iteration 10 --
-float(%f)
+float(%d)
-- Iteration 11 --
-float(%f)
+float(%d)
-- Iteration 12 --
-float(%f)
+float(%d)
+*** Testing with Binary Input ***
+float(%d)
--- Done ---