]> granicus.if.org Git - php/commitdiff
Fixed test
authorDmitry Stogov <dmitry@php.net>
Tue, 22 Sep 2009 08:47:30 +0000 (08:47 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 22 Sep 2009 08:47:30 +0000 (08:47 +0000)
ext/xmlwriter/tests/bug48204.phpt

index 86ab6688d75a9de7a648a46f0d42c3be414ebd86..ca4a15007c6d0e4f0eabafa0cdb3be9e09de94ed 100644 (file)
@@ -2,8 +2,16 @@
 xmlwriter_open_uri with PHP_MAXPATHLEN + 1
 --SKIPIF--
 <?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
+<?php if (!defined('PHP_MAXPATHLEN') && !substr(PHP_OS, 0, 3) == "WIN" && !stristr(PHP_OS, 'linux')) print "skip unknown PHP_MAXPATHLEN"; ?>
 --FILE--
 <?php 
+if (!defined('PHP_MAXPATHLEN')) {
+       if (substr(PHP_OS, 0, 3) == "WIN") {
+               define('PHP_MAXPATHLEN', 260);
+       } else if (stristr(PHP_OS, 'linux')) {
+               define('PHP_MAXPATHLEN', 4096);
+       }
+}
 $path = str_repeat('a', PHP_MAXPATHLEN + 1);
 var_dump(xmlwriter_open_uri('file:///' . $path));
 ?>