Return to realpath_variation2.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / file |
1.1 misho 1: --TEST-- 2: Test realpath() function : variation 3: --CREDITS-- 4: Dave Kelsey <d_kelsey@uk.ibm.com> 5: --SKIPIF-- 6: <?php 7: if(substr(PHP_OS, 0, 3) == 'WIN' ) 8: die("skip Not Valid for Windows"); 9: ?> 10: --FILE-- 11: <?php 12: /* Prototype : string realpath(string path) 13: * Description: Return the resolved path 14: * Source code: ext/standard/file.c 15: * Alias to functions: 16: */ 17: 18: echo "*** Testing realpath() : variation ***\n"; 19: 20: $paths = array('c:\\', 21: 'c:', 22: 'c' , 23: '\\' , 24: '/', 25: 'c:temp', 26: 'c:\\/', 27: '/tmp/', 28: '/tmp/\\', 29: '\\tmp', 30: '\\tmp\\'); 31: 32: foreach($paths as $path) { 33: echo "\n--$path--\n"; 34: var_dump( realpath($path) ); 35: }; 36: 37: ?> 38: ===DONE=== 39: --EXPECTF-- 40: *** Testing realpath() : variation *** 41: 42: --c:\-- 43: bool(false) 44: 45: --c:-- 46: bool(false) 47: 48: --c-- 49: bool(false) 50: 51: --\-- 52: bool(false) 53: 54: --/-- 55: string(1) "/" 56: 57: --c:temp-- 58: bool(false) 59: 60: --c:\/-- 61: bool(false) 62: 63: --/tmp/-- 64: string(%d) %s/tmp" 65: 66: --/tmp/\-- 67: bool(false) 68: 69: --\tmp-- 70: bool(false) 71: 72: --\tmp\-- 73: bool(false) 74: ===DONE===