From: Christian Stocker Date: Sat, 29 Nov 2003 16:38:09 +0000 (+0000) Subject: testcase for bug26384 X-Git-Tag: php-5.0.0b3RC1~529 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=146e88ac02a103371f3335c1c2e8ca323659ea3f;p=php testcase for bug26384 --- diff --git a/ext/xsl/tests/area_list.xsl b/ext/xsl/tests/area_list.xsl new file mode 100644 index 0000000000..45b6cffefa --- /dev/null +++ b/ext/xsl/tests/area_list.xsl @@ -0,0 +1,10 @@ + + + + + + + + HERE + + diff --git a/ext/xsl/tests/area_name.xml b/ext/xsl/tests/area_name.xml new file mode 100644 index 0000000000..55e38cda69 --- /dev/null +++ b/ext/xsl/tests/area_name.xml @@ -0,0 +1,9 @@ + + + + 13 + "Автово" м. + m."Avtovo" + + + diff --git a/ext/xsl/tests/bug26384.phpt b/ext/xsl/tests/bug26384.phpt new file mode 100644 index 0000000000..b8f80f8c3e --- /dev/null +++ b/ext/xsl/tests/bug26384.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #26384 (domxslt->process causes segfault with xsl:key) +--SKIPIF-- + +--FILE-- +load(dirname(__FILE__)."/area_name.xml"); +if(!$dom) { + echo "Error while parsing the document\n"; + exit; +} +$xsl = new domDocument; +$xsl->load(dirname(__FILE__)."/area_list.xsl"); +if(!$xsl) { + echo "Error while parsing the document\n"; + exit; +} +$proc = new xsltprocessor; +if(!$proc) { + echo "Error while making xsltprocessor object\n"; + exit; +} + +$proc->importStylesheet($xsl); +print $proc->transformToXml($dom); + +//this segfaulted before +print $dom->documentElement->firstChild->nextSibling->nodeName; + +--EXPECT-- +HERE +ROW