(xslt tests) Add test for memory leaks, caused by inapproreate use of

the struct. Memory leak is caused by at least 2 errors on
             handle.
This commit is contained in:
Melvyn Sopacua 2002-10-06 23:58:51 +00:00
parent 510f3b0305
commit 2628482ee9

17
ext/xslt/tests/009.phpt Normal file
View File

@ -0,0 +1,17 @@
--TEST--
Memoryleak in error printing
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
error_reporting(E_ALL);
$xmlfile = 'ext/xslt/tests/non-existent.xml';
$xslfile = 'ext/xslt/tests/non-existent.xsl';
$xh = xslt_create();
$result = xslt_process($xh, $xmlfile, $xslfile, NULL);
xslt_free($xh);
?>
--EXPECTF--
Warning: Sablotron error on line none: cannot open file '%s/ext/xslt/tests/non-existent.xsl' in %s/ext/xslt/tests/phpt.%s on line %i
%sext/xslt/tests/%s(%i) : Warning - Sablotron error on line none: cannot open file '%sext/xslt/tests/non-existent.xsl'