File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
pspell /
tests /
002.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:00 2012 UTC (12 years, 10 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
pspell session
--SKIPIF--
<?php
if (!extension_loaded('pspell')) die('skip');
if (!@pspell_new('en')) die('skip English dictionary is not available');
?>
--FILE--
<?php
$p = pspell_new('en');
var_dump(pspell_check('a'));
var_dump(pspell_check($p, 'somebogusword'));
var_dump(pspell_add_to_session($p, ''));
var_dump(pspell_add_to_session($p, 'somebogusword'));
var_dump(pspell_check($p, 'somebogusword'));
var_dump(pspell_clear_session(new stdclass));
$res = @pspell_clear_session($p);
if ($res) {
var_dump($res);
var_dump(pspell_check($p, 'somebogusword'));
} else {
echo "bool(true)\n";
echo "bool(false)\n";
}
?>
--EXPECTF--
Warning: pspell_check() expects exactly 2 parameters, 1 given in %s on line %d
NULL
bool(false)
bool(false)
bool(true)
bool(true)
Warning: pspell_clear_session() expects parameter 1 to be long, object given in %s on line %d
NULL
bool(true)
bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>