1--TEST--
2Bug #70943 fopen() can't open a file if path is 259 characters long
3--SKIPIF--
4<?php
5include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
6
7skip_if_not_win();
8if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
9
10?>
11--FILE--
12<?php
13// Generates a sample file whose path is exactly 259 characters long
14$testFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(dirname(__FILE__))).".dat";
15echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n";
16touch($testFile);
17
18echo "Opening file... ";
19if ($fp = fopen($testFile, "r")) {
20	fclose($fp);
21	echo "OK", "\n";
22}
23
24unlink($testFile);
25
26?>
27===DONE===
28--EXPECT--
29Generating a file with a path length of 259 characters...
30Opening file... OK
31===DONE===
32