Annotation of embedaddon/php/ext/standard/tests/file/filesize_variation1-win32.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test filesize() function: usage variations - size of files
! 3: --SKIPIF--
! 4: <?php
! 5: if (substr(PHP_OS, 0, 3) != 'WIN') {
! 6: die('skip only valid for Windows');
! 7: }
! 8: --FILE--
! 9: <?php
! 10: /*
! 11: Prototype : int filesize ( string $filename );
! 12: Description : Returns the size of the file in bytes, or FALSE
! 13: (and generates an error of level E_WARNING) in case of an error.
! 14: */
! 15:
! 16: $file_path = dirname(__FILE__);
! 17: require($file_path."/file.inc");
! 18:
! 19: echo "*** Testing filesize(): usage variations ***\n";
! 20:
! 21: echo "*** Checking filesize() with different size of files ***\n";
! 22: for($size = 1; $size <10000; $size = $size+1000)
! 23: {
! 24: create_files($file_path, 1, "numeric", 0755, $size, "w", "filesize_variation");
! 25: var_dump( filesize( $file_path."/filesize_variation1.tmp") );
! 26: clearstatcache();
! 27: delete_files($file_path, 1, "filesize_variation");
! 28: }
! 29:
! 30: echo "*** Done ***\n";
! 31: ?>
! 32: --EXPECTF--
! 33: *** Testing filesize(): usage variations ***
! 34: *** Checking filesize() with different size of files ***
! 35: int(1024)
! 36: int(1025024)
! 37: int(2049024)
! 38: int(3073024)
! 39: int(4097024)
! 40: int(5121024)
! 41: int(6145024)
! 42: int(7169024)
! 43: int(8193024)
! 44: int(9217024)
! 45: *** Done ***
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>