Annotation of embedaddon/php/ext/standard/tests/file/fileinode_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test fileinode() function: Basic functionality
! 3: --FILE--
! 4: <?php
! 5: /*
! 6: Prototype: int fileinode ( string $filename );
! 7: Description: Returns the inode number of the file, or FALSE in case of an error.
! 8: */
! 9:
! 10: echo "*** Testing fileinode() with file, directory ***\n";
! 11:
! 12: /* Getting inode of created file */
! 13: $file_path = dirname(__FILE__);
! 14: fopen("$file_path/inode.tmp", "w");
! 15: print( fileinode("$file_path/inode.tmp") )."\n";
! 16:
! 17: /* Getting inode of current file */
! 18: print( fileinode(__FILE__) )."\n";
! 19:
! 20: /* Getting inode of directories */
! 21: print( fileinode(".") )."\n";
! 22: print( fileinode("./..") )."\n";
! 23:
! 24: echo "\n*** Done ***";
! 25: --CLEAN--
! 26: <?php
! 27: unlink (dirname(__FILE__)."/inode.tmp");
! 28: ?>
! 29: --EXPECTF--
! 30: *** Testing fileinode() with file, directory ***
! 31: %d
! 32: %d
! 33: %d
! 34: %d
! 35:
! 36: *** Done ***
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>