Annotation of embedaddon/php/ext/standard/tests/strings/pathinfo.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: pathinfo() tests
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(pathinfo());
! 7: var_dump(pathinfo(""));
! 8: var_dump(pathinfo("."));
! 9: var_dump(pathinfo(".."));
! 10: var_dump(pathinfo("/"));
! 11: var_dump(pathinfo("./"));
! 12: var_dump(pathinfo("/."));
! 13: var_dump(pathinfo(".cvsignore"));
! 14: var_dump(pathinfo(__FILE__, PATHINFO_BASENAME));
! 15: var_dump(pathinfo(__FILE__, PATHINFO_FILENAME));
! 16: var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION));
! 17: var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME));
! 18: var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME|PATHINFO_DIRNAME));
! 19: var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME|PATHINFO_BASENAME));
! 20: var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME));
! 21: var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_BASENAME));
! 22: var_dump(pathinfo(__FILE__, PATHINFO_FILENAME|PATHINFO_DIRNAME));
! 23: var_dump(pathinfo(__FILE__, PATHINFO_FILENAME|PATHINFO_BASENAME));
! 24: var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_EXTENSION));
! 25: var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_BASENAME));
! 26:
! 27: echo "Done\n";
! 28: ?>
! 29: --EXPECTF--
! 30: Warning: pathinfo() expects at least 1 parameter, 0 given in %s on line %d
! 31: NULL
! 32: array(2) {
! 33: ["basename"]=>
! 34: string(0) ""
! 35: ["filename"]=>
! 36: string(0) ""
! 37: }
! 38: array(4) {
! 39: ["dirname"]=>
! 40: string(1) "."
! 41: ["basename"]=>
! 42: string(1) "."
! 43: ["extension"]=>
! 44: string(0) ""
! 45: ["filename"]=>
! 46: string(0) ""
! 47: }
! 48: array(4) {
! 49: ["dirname"]=>
! 50: string(1) "."
! 51: ["basename"]=>
! 52: string(2) ".."
! 53: ["extension"]=>
! 54: string(0) ""
! 55: ["filename"]=>
! 56: string(1) "."
! 57: }
! 58: array(3) {
! 59: ["dirname"]=>
! 60: string(1) "%e"
! 61: ["basename"]=>
! 62: string(0) ""
! 63: ["filename"]=>
! 64: string(0) ""
! 65: }
! 66: array(4) {
! 67: ["dirname"]=>
! 68: string(1) "."
! 69: ["basename"]=>
! 70: string(1) "."
! 71: ["extension"]=>
! 72: string(0) ""
! 73: ["filename"]=>
! 74: string(0) ""
! 75: }
! 76: array(4) {
! 77: ["dirname"]=>
! 78: string(1) "%e"
! 79: ["basename"]=>
! 80: string(1) "."
! 81: ["extension"]=>
! 82: string(0) ""
! 83: ["filename"]=>
! 84: string(0) ""
! 85: }
! 86: array(4) {
! 87: ["dirname"]=>
! 88: string(1) "."
! 89: ["basename"]=>
! 90: string(10) ".cvsignore"
! 91: ["extension"]=>
! 92: string(9) "cvsignore"
! 93: ["filename"]=>
! 94: string(0) ""
! 95: }
! 96: string(12) "pathinfo.php"
! 97: string(8) "pathinfo"
! 98: string(3) "php"
! 99: string(%d) "%s%estrings"
! 100: string(%d) "%s%estrings"
! 101: string(12) "pathinfo.php"
! 102: string(3) "php"
! 103: string(12) "pathinfo.php"
! 104: string(%d) "%s%estrings"
! 105: string(12) "pathinfo.php"
! 106: string(%d) "%s%estrings"
! 107: string(%d) "%s%estrings"
! 108: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>