diff options
| author | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 17:45:48 +0200 |
|---|---|---|
| committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 19:45:12 +0200 |
| commit | 782352c54ad69c517e3c32b0dd2c25d74842647a (patch) | |
| tree | 220bdc1e814e9f44b3578d49b3f239a3fdefa1d0 /ext/standard/tests/file/ftruncate_variation7-win32.phpt | |
| parent | 604d4bdae5037e021c1f9d35f08cbeddd610d84c (diff) | |
| download | php-git-782352c54ad69c517e3c32b0dd2c25d74842647a.tar.gz | |
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/standard/tests/file/ftruncate_variation7-win32.phpt')
| -rw-r--r-- | ext/standard/tests/file/ftruncate_variation7-win32.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/tests/file/ftruncate_variation7-win32.phpt b/ext/standard/tests/file/ftruncate_variation7-win32.phpt index 09158ca490..cdb77673b7 100644 --- a/ext/standard/tests/file/ftruncate_variation7-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation7-win32.phpt @@ -20,7 +20,7 @@ include ("file.inc"); echo "*** Testing ftruncate() : usage variations ***\n"; /* test ftruncate with file opened in different modes */ -$file_modes = array("r", "rb", "rt", "r+", "r+b", "r+t", +$file_modes = array("r", "rb", "rt", "r+", "r+b", "r+t", "w", "wb", "wt", "w+", "w+b", "w+t", "x", "xb", "xt", "x+", "x+b", "x+t", "a", "ab", "at", "a+", "a+b", "a+t"); @@ -45,15 +45,15 @@ foreach($file_content_types as $file_content_type) { $file_handle = fopen($filename, $file_modes[$mode_counter]); } if (!$file_handle) { - echo "Error: failed to open file $filename!\n"; + echo "Error: failed to open file $filename!\n"; exit(); } - rewind($file_handle); // file pointer to 0 - + rewind($file_handle); // file pointer to 0 + echo "-- Testing ftruncate(): File pointer at the end --\n"; /* try to truncate it to while file pointer at the end */ - fseek($file_handle, 0, SEEK_END); + fseek($file_handle, 0, SEEK_END); $new_size = 200; var_dump( filesize($filename) ); // current filesize var_dump( ftell($file_handle) ); @@ -62,8 +62,8 @@ foreach($file_content_types as $file_content_type) { var_dump( feof($file_handle) ); fclose($file_handle); clearstatcache(); // clear previous size value in cache - var_dump( filesize($filename) ); - + var_dump( filesize($filename) ); + //delete all files created delete_file($filename); }//end of inner for loop |
