mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
31 lines
773 B
PHP
31 lines
773 B
PHP
--TEST--
|
|
enchant_dict_quick_check() basic test
|
|
--CREDITS--
|
|
marcosptf - <marcosptf@yahoo.com.br>
|
|
--SKIPIF--
|
|
<?php
|
|
if(!extension_loaded('enchant')) die('skip, enchant not loader');
|
|
if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
|
|
if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
|
|
|
|
$tag = 'en_US';
|
|
$r = enchant_broker_init();
|
|
if (!enchant_broker_dict_exists($r, $tag))
|
|
die('skip, no dictionary for ' . $tag . ' tag');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$tag = 'en_US';
|
|
$r = enchant_broker_init();
|
|
|
|
$d = enchant_broker_request_dict($r, $tag);
|
|
enchant_dict_quick_check($d, 'soong', $suggs);
|
|
|
|
echo "Elements: " . count($suggs) . "\n";
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Elements: %d
|
|
Done
|