File: 001.phpt

package info (click to toggle)
php4-ps 1.3.4-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 576 kB
  • ctags: 371
  • sloc: ansic: 1,533; php: 1,272; xml: 147; makefile: 75; sh: 40
file content (22 lines) | stat: -rw-r--r-- 433 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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", "tests/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