summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/basename_bug66395_variation2-win32.phpt
blob: 4dc05dbeb14fe23cec7bb57d083c7fcf0fa17c67 (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
31
32
33
34
35
36
37
38
--TEST--
basename bug #66395 check drive traversing and NTFS streams
--SKIPIF--
<?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip Windows only basename tests'); } ?>
--FILE--
<?php
echo basename("y:") . "\n";
echo basename("y:/") . "\n";
echo basename("notdriveletter:file.txt") . "\n";
echo basename("a:\\b:c:d:hello.txt\\hcd:c.txt") . "\n";
echo basename("a:b:c:d:hello.txt\\d:some.txt") . "\n";
echo basename("a:b:c:d:hello\world\a.bmp\c:d:e:f.txt") . "\n";
echo basename("a:\\b:\\c:d:hello\\world\\a.bmp\\d:e:f:g.txt") . "\n";
echo basename("a:\\b:\\c:d:hello/world\\a.bmp\\d:\\e:\\f:g.txt") . "\n";
echo basename("a:\\b:/c:d:hello\\world:somestream") . "\n";
echo basename("a:\\b:\\c:d:hello\\world:some.stream") . "\n";
echo basename("a:/b:\\c:d:hello\\world:some.stream:\$DATA") . "\n";
echo basename("x:y:z:hello\world:my.stream:\$DATA") . "\n";
echo basename("a:\\b:\\c:d:hello\\world:c:\$DATA") . "\n";
echo basename("a:\\b:\\c:d:hello\\d:world:c:\$DATA") . "\n";
?>
==DONE==
--EXPECT--
y
y
notdriveletter:file.txt
hcd:c.txt
some.txt
f.txt
g.txt
g.txt
world:somestream
world:some.stream
world:some.stream:$DATA
world:my.stream:$DATA
world:c:$DATA
world:c:$DATA
==DONE==