Annotation of embedaddon/php/ext/standard/tests/file/filesize_variation1.phpt, revision 1.1.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 Not valid on 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(%d)
                     36: int(%d)
                     37: int(%d)
                     38: int(%d)
                     39: int(%d)
                     40: int(%d)
                     41: int(%d)
                     42: int(%d)
                     43: int(%d)
                     44: int(%d)
                     45: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>