xref: /PHP-8.3/ext/pspell/tests/002.phpt (revision 74859783)
1--TEST--
2pspell session
3--EXTENSIONS--
4pspell
5--SKIPIF--
6<?php
7if (!@pspell_new('en')) die('skip English dictionary is not available');
8?>
9--FILE--
10<?php
11
12$p = pspell_new('en');
13
14var_dump(pspell_check($p, 'somebogusword'));
15
16var_dump(pspell_add_to_session($p, ''));
17var_dump(pspell_add_to_session($p, 'somebogusword'));
18var_dump(pspell_check($p, 'somebogusword'));
19
20$res = @pspell_clear_session($p);
21if ($res) {
22    var_dump($res);
23    var_dump(pspell_check($p, 'somebogusword'));
24} else {
25    echo "bool(true)\n";
26    echo "bool(false)\n";
27}
28?>
29--EXPECT--
30bool(false)
31bool(false)
32bool(true)
33bool(true)
34bool(true)
35bool(false)
36