summaryrefslogtreecommitdiff
path: root/ext/phar/tests/zip/odt.phpt
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-04-20 05:22:02 +0000
committerGreg Beaver <cellog@php.net>2008-04-20 05:22:02 +0000
commit4336865bb485b29c1948dcbd84805f57f9cd32df (patch)
tree5b82b33f98423c2b9c1101872a7a47339ec597b2 /ext/phar/tests/zip/odt.phpt
parent0cf701fe4e3746c038d8465117cd86bc4b78e6ff (diff)
downloadphp-git-4336865bb485b29c1948dcbd84805f57f9cd32df.tar.gz
add new test for openoffice-created zip
Diffstat (limited to 'ext/phar/tests/zip/odt.phpt')
-rw-r--r--ext/phar/tests/zip/odt.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/phar/tests/zip/odt.phpt b/ext/phar/tests/zip/odt.phpt
new file mode 100644
index 0000000000..9901c21cb7
--- /dev/null
+++ b/ext/phar/tests/zip/odt.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Phar: test a zip archive created by openoffice
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+--FILE--
+<?php
+$a = new PharData(dirname(__FILE__) . '/files/odt.odt');
+foreach (new RecursiveIteratorIterator($a, RecursiveIteratorIterator::LEAVES_ONLY) as $b) {
+ if ($b->isDir()) {
+ echo "dir " . $b->getPathName() . "\n";
+ } else {
+ echo $b->getPathName() . "\n";
+ }
+}
+?>
+===DONE===
+--EXPECTF--
+phar://%sodt.odt%cConfigurations2%caccelerator%ccurrent.xml
+phar://%sodt.odt%cMETA-INF%cmanifest.xml
+phar://%sodt.odt%cThumbnails%cthumbnail.png
+phar://%sodt.odt%ccontent.xml
+phar://%sodt.odt%cmeta.xml
+phar://%sodt.odt%cmimetype
+phar://%sodt.odt%csettings.xml
+phar://%sodt.odt%cstyles.xml
+===DONE===