Annotation of embedaddon/php/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: basename bug #66395 check drive traversing and NTFS streams
3: --SKIPIF--
4: <?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip Windows only basename tests'); } ?>
5: --FILE--
6: <?php
7: echo basename("y:") . "\n";
8: echo basename("y:/") . "\n";
9: echo basename("notdriveletter:file.txt") . "\n";
10: echo basename("a:\\b:c:d:hello.txt\\hcd:c.txt") . "\n";
11: echo basename("a:b:c:d:hello.txt\\d:some.txt") . "\n";
12: echo basename("a:b:c:d:hello\world\a.bmp\c:d:e:f.txt") . "\n";
13: echo basename("a:\\b:\\c:d:hello\\world\\a.bmp\\d:e:f:g.txt") . "\n";
14: echo basename("a:\\b:\\c:d:hello/world\\a.bmp\\d:\\e:\\f:g.txt") . "\n";
15: echo basename("a:\\b:/c:d:hello\\world:somestream") . "\n";
16: echo basename("a:\\b:\\c:d:hello\\world:some.stream") . "\n";
17: echo basename("a:/b:\\c:d:hello\\world:some.stream:\$DATA") . "\n";
18: echo basename("x:y:z:hello\world:my.stream:\$DATA") . "\n";
19: echo basename("a:\\b:\\c:d:hello\\world:c:\$DATA") . "\n";
20: echo basename("a:\\b:\\c:d:hello\\d:world:c:\$DATA") . "\n";
21: ?>
22: ==DONE==
23: --EXPECTF--
24: y
25: y
26: notdriveletter:file.txt
27: hcd:c.txt
28: some.txt
29: f.txt
30: g.txt
31: g.txt
32: world:somestream
33: world:some.stream
34: world:some.stream:$DATA
35: world:my.stream:$DATA
36: world:c:$DATA
37: world:c:$DATA
38: ==DONE==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>