]> granicus.if.org Git - php/commitdiff
- fix tests for PI with libxml 2.6.24+, a new line is now added
authorPierre Joye <pajoye@php.net>
Wed, 19 Jul 2006 18:50:51 +0000 (18:50 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 19 Jul 2006 18:50:51 +0000 (18:50 +0000)
ext/xmlwriter/tests/009.phpt
ext/xmlwriter/tests/OO_009.phpt

index 9c00fe7b0e405d4b912285c1f6c4a6963bf876a8..002916ff10aa010e67d0408a697de7f82844ec0e 100644 (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>
index aa3e95596f72ab4bc1fc0c825143348dd307e33b..c874f3e4ef834e21c1949c3a69580e8b5deae2d0 100644 (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>