mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
e8a3530d50
increases coverage from 20% to 70%
36 lines
712 B
PHP
36 lines
712 B
PHP
--TEST--
|
|
pspell configs
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('pspell')) die('skip');
|
|
if (!@pspell_new('en')) die('skip English dictionary is not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$cfg = pspell_config_create('en', 'british', '', 'iso8859-1');
|
|
var_dump(pspell_config_mode($cfg, PSPELL_BAD_SPELLERS));
|
|
|
|
var_dump(pspell_config_runtogether($cfg, false));
|
|
$p = pspell_new_config($cfg);
|
|
var_dump(pspell_check($p, 'theoasis'));
|
|
|
|
echo "---\n";
|
|
|
|
// now it should pass
|
|
var_dump(pspell_config_runtogether($cfg, true));
|
|
$p = pspell_new_config($cfg);
|
|
var_dump(pspell_check($p, 'theoasis'));
|
|
|
|
var_dump(pspell_config_runtogether($cfg, NULL))
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
---
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|