1--TEST--
2Test filesize() function: usage variations - size of files
3--SKIPIF--
4<?php
5if (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__);
17require($file_path."/file.inc");
18
19echo "*** Testing filesize(): usage variations ***\n";
20
21echo "*** Checking filesize() with different size of files ***\n";
22for($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
30echo "*** Done ***\n";
31?>
32--EXPECTF--
33*** Testing filesize(): usage variations ***
34*** Checking filesize() with different size of files ***
35int(1024)
36int(1025024)
37int(2049024)
38int(3073024)
39int(4097024)
40int(5121024)
41int(6145024)
42int(7169024)
43int(8193024)
44int(9217024)
45*** Done ***
46