- MFH: fix tests, libxml 2.6.24 and up adds a new line after a processing

instruction (PI)
This commit is contained in:
Pierre Joye 2006-07-19 18:58:06 +00:00
parent d4be83b5c4
commit 93d4de150e
2 changed files with 10 additions and 6 deletions

View file

@ -8,7 +8,9 @@ if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ requi
--FILE--
<?php
/* $Id$ */
/*
Libxml 2.6.24 and up adds a new line after a processing instruction (PI)
*/
$xw = xmlwriter_open_memory();
xmlwriter_set_indent($xw, TRUE);
xmlwriter_start_document($xw, NULL, "UTF-8");
@ -32,12 +34,12 @@ xmlwriter_end_document($xw);
$output = xmlwriter_flush($xw, true);
print $output;
?>
--EXPECT--
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<root id="elem1">
<elem1 attr1="first">
<!--start PI-->
<pi><?php echo "hello world"; ?></pi>
<pi><?php echo "hello world"; ?>%w</pi>
<cdata><![CDATA[<>&"]]></cdata>
</elem1>
</root>

View file

@ -7,7 +7,9 @@ if (!extension_loaded("xmlwriter")) die("skip");
--FILE--
<?php
/* $Id$ */
/*
Libxml 2.6.24 and up adds a new line after a processing instruction (PI)
*/
$xw = new XMLWriter();
$xw->openMemory();
$xw->setIndent(TRUE);
@ -32,12 +34,12 @@ $xw->endDocument();
$output = $xw->flush(true);
print $output;
?>
--EXPECT--
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<root id="elem1">
<elem1 attr1="first">
<!--start PI-->
<pi><?php echo "hello world"; ?></pi>
<pi><?php echo "hello world"; ?>%w</pi>
<cdata><![CDATA[<>&"]]></cdata>
</elem1>
</root>