From e63aa705a355b4cb6f0ebf12bff5e3b164ebf850 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 7 Sep 2011 09:03:07 +0000 Subject: [PATCH] - fix test for OS where dir sep is \ --- ext/dom/tests/dom_xinclude.phpt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) { -- 2.50.1