cvs: pecl /ps/tests 001.phpt
| From: | Uwe Steinmann | Date: | Wed, 21 Apr 2004 09:51:49 +0000 |
| Subject: | cvs: pecl /ps/tests 001.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1164@lists.php.net to get a copy of this message | ||
steinm Wed Apr 21 05:51:49 2004 EDT
Added files:
/pecl/ps/tests 001.phpt
Log:
- first test for ps_hyphenation
http://cvs.php.net/co.php/pecl/ps/tests/001.phpt?r=1.1&p=1
Index: pecl/ps/tests/001.phpt
+++ pecl/ps/tests/001.phpt
--TEST--
Testing hyphenation
--SKIPIF--
<?php if (!extension_loaded("ps")) print "skip"; ?>
--POST--
--GET--
--INI--
--FILE--
<?php
$word = "Koordinatensystem";
$psdoc = ps_new();
ps_set_parameter($psdoc, "hyphendict", "hyph_de.dic");
$hyphens = ps_hyphenate($psdoc, $word);
for($i=0; $i<strlen($word); $i++) {
echo $word[$i];
if(in_array($i, $hyphens))
echo "-";
}
ps_delete($psdoc);
?>
--EXPECT--
Ko-ordi-na-ten-sys-tem