1--TEST--
2Test realpath() function : variation
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--SKIPIF--
6<?php
7if(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
18echo "*** 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
32foreach($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:\--
43bool(false)
44
45--c:--
46bool(false)
47
48--c--
49bool(false)
50
51--\--
52bool(false)
53
54--/--
55string(1) "/"
56
57--c:temp--
58bool(false)
59
60--c:\/--
61bool(false)
62
63--/tmp/--
64string(%d) %s/tmp"
65
66--/tmp/\--
67bool(false)
68
69--\tmp--
70bool(false)
71
72--\tmp\--
73bool(false)
74===DONE===
75