From: Pierre Joye Date: Wed, 7 Sep 2011 09:03:07 +0000 (+0000) Subject: - fix test for OS where dir sep is \ X-Git-Tag: php-5.5.0alpha1~1248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e63aa705a355b4cb6f0ebf12bff5e3b164ebf850;p=php - fix test for OS where dir sep is \ --- diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt index 686a9e81aa..5d8906e316 100644 --- a/ext/dom/tests/dom_xinclude.phpt +++ b/ext/dom/tests/dom_xinclude.phpt @@ -10,10 +10,14 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap $dom = new domdocument; $data = file_get_contents(dirname(__FILE__)."/xinclude.xml"); -$data = str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.dirname(__FILE__).'/', $data); +$reldir = str_replace(getcwd(),".",dirname(__FILE__)); +if (DIRECTORY_SEPARATOR == '\\') { + $reldir = str_replace('\\',"/", $reldir); +} +$data = str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/", $data); -$dom->loadXML($data); +$dom->loadXML($data); $dom->xinclude(); print $dom->saveXML()."\n"; foreach ($dom->documentElement->childNodes as $node) {