diff options
author | Marcus Boerger <helly@php.net> | 2005-07-03 09:10:41 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2005-07-03 09:10:41 +0000 |
commit | d3c337e59d63e2a4e092dedb44d05bcbc6174fb2 (patch) | |
tree | 4ff074e4a71ef06665eba8a8d9cfe3b4bb897090 /ext/xmlwriter | |
parent | fa9fdbeeac97664f9c32402511bb18dbc3eab6bd (diff) | |
download | php-git-d3c337e59d63e2a4e092dedb44d05bcbc6174fb2.tar.gz |
- Tweak tests a bit
Diffstat (limited to 'ext/xmlwriter')
-rw-r--r-- | ext/xmlwriter/tests/001.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/002.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/003.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/004.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/005.phpt | 9 | ||||
-rw-r--r-- | ext/xmlwriter/tests/OO_001.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/OO_002.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/OO_003.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/OO_004.phpt | 4 | ||||
-rw-r--r-- | ext/xmlwriter/tests/OO_005.phpt | 9 |
10 files changed, 28 insertions, 22 deletions
diff --git a/ext/xmlwriter/tests/001.phpt b/ext/xmlwriter/tests/001.phpt index 2c9f96aa42..d26096ed1f 100644 --- a/ext/xmlwriter/tests/001.phpt +++ b/ext/xmlwriter/tests/001.phpt @@ -16,9 +16,9 @@ xmlwriter_end_document($xw); $output_bytes = xmlwriter_flush($xw, true); echo file_get_contents($doc_dest); unlink('001.xml'); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1/> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/002.phpt b/ext/xmlwriter/tests/002.phpt index ce21abf375..1d769a5c22 100644 --- a/ext/xmlwriter/tests/002.phpt +++ b/ext/xmlwriter/tests/002.phpt @@ -14,9 +14,9 @@ xmlwriter_end_document($xw); // Force to write and empty the buffer echo xmlwriter_flush($xw, true); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1/> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/003.phpt b/ext/xmlwriter/tests/003.phpt index 8436c2e66d..2ab3a9d776 100644 --- a/ext/xmlwriter/tests/003.phpt +++ b/ext/xmlwriter/tests/003.phpt @@ -27,9 +27,9 @@ xmlwriter_end_document($xw); // Force to write and empty the buffer echo xmlwriter_flush($xw, true); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1 attr1="attr1_value" att2="att2_value">Test text for tag1<tag2/></tag1> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/004.phpt b/ext/xmlwriter/tests/004.phpt index f9d512739a..13e471da9d 100644 --- a/ext/xmlwriter/tests/004.phpt +++ b/ext/xmlwriter/tests/004.phpt @@ -28,8 +28,8 @@ if ($md5_out != $md5_res) { } else { echo "ok.\n"; } -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- ok. ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/005.phpt b/ext/xmlwriter/tests/005.phpt index 8ea2d1ed96..6874c5d2c3 100644 --- a/ext/xmlwriter/tests/005.phpt +++ b/ext/xmlwriter/tests/005.phpt @@ -1,7 +1,10 @@ --TEST-- XMLWriter: libxml2 XML Writer, comments --SKIPIF-- -<?php if (!extension_loaded("xmlwriter")) print "skip"; ?> +<?php +if (!extension_loaded("xmlwriter")) die("skip"); +if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ required"); +?> --FILE-- <?php /* $Id$ */ @@ -21,9 +24,9 @@ xmlwriter_end_document($xw); $output_bytes = xmlwriter_flush($xw, true); echo file_get_contents($doc_dest); unlink('001.xml'); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1><!--comment--><!--comment #2--></tag1> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/OO_001.phpt b/ext/xmlwriter/tests/OO_001.phpt index abc533156a..333a16a41c 100644 --- a/ext/xmlwriter/tests/OO_001.phpt +++ b/ext/xmlwriter/tests/OO_001.phpt @@ -17,9 +17,9 @@ $xw->endDocument(); $output_bytes = $xw->flush(true); echo file_get_contents($doc_dest); unlink('001.xml'); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8" standalone="standalonearg"?> <tag1/> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/OO_002.phpt b/ext/xmlwriter/tests/OO_002.phpt index c449b9da05..515ebbb359 100644 --- a/ext/xmlwriter/tests/OO_002.phpt +++ b/ext/xmlwriter/tests/OO_002.phpt @@ -14,9 +14,9 @@ $xw->endDocument(); // Force to write and empty the buffer echo $xw->flush(true); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8" standalone="standalone"?> <tag1/> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/OO_003.phpt b/ext/xmlwriter/tests/OO_003.phpt index bd98a4c663..c0e5585fc6 100644 --- a/ext/xmlwriter/tests/OO_003.phpt +++ b/ext/xmlwriter/tests/OO_003.phpt @@ -29,9 +29,9 @@ $xw->endDocument(); // Force to write and empty the buffer echo $xw->flush(true); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1 attr1="attr1_value" attr2="attr2_value">Test text for tag1<tag2/></tag1> ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/OO_004.phpt b/ext/xmlwriter/tests/OO_004.phpt index a9e8fa78dc..0effec37b8 100644 --- a/ext/xmlwriter/tests/OO_004.phpt +++ b/ext/xmlwriter/tests/OO_004.phpt @@ -29,8 +29,8 @@ if ($md5_out != $md5_res) { } else { echo "ok.\n"; } -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- ok. ----Done--- +===DONE=== diff --git a/ext/xmlwriter/tests/OO_005.phpt b/ext/xmlwriter/tests/OO_005.phpt index b37041a637..8037fc62f1 100644 --- a/ext/xmlwriter/tests/OO_005.phpt +++ b/ext/xmlwriter/tests/OO_005.phpt @@ -1,7 +1,10 @@ --TEST-- XMLWriter: libxml2 XML Writer, comments --SKIPIF-- -<?php if (!extension_loaded("xmlwriter")) print "skip"; ?> +<?php +if (!extension_loaded("xmlwriter")) die("skip"); +if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ required"); +?> --FILE-- <?php /* $Id$ */ @@ -21,9 +24,9 @@ $xw->endDocument(); $output_bytes = $xw->flush(true); echo file_get_contents($doc_dest); unlink('001.xml'); -echo "---Done---\n"; ?> +===DONE=== --EXPECT-- <?xml version="1.0" encoding="utf8"?> <tag1><!--comment--><!--comment #2--></tag1> ----Done--- +===DONE=== |