blob: c2e1edbe1464b7dc18f040ed993b318c048414e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--TEST--
dirname test
--FILE--
<?php
function check_dirname($path)
{
print "dirname($path) == " . dirname($path) . "\n";
}
check_dirname("/foo/");
check_dirname("/foo");
check_dirname("/foo/bar");
check_dirname("d:\\foo\\bar.inc");
check_dirname("/");
check_dirname(".../foo");
check_dirname("./foo");
check_dirname("foobar///");
check_dirname("c:\foo");
?>
--EXPECT--
dirname(/foo/) == /
dirname(/foo) == /
dirname(/foo/bar) == /foo
dirname(d:\foo\bar.inc) == .
dirname(/) == /
dirname(.../foo) == ...
dirname(./foo) == .
dirname(foobar///) == .
dirname(c:\foo) == .
|