dict_quick_check.phpt 517 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. enchant_dict_quick_check() basic test
  3. --SKIPIF--
  4. <?php
  5. if(!extension_loaded('enchant')) die('skip, enchant not loader');
  6. $tag = 'en_US';
  7. $r = enchant_broker_init();
  8. if (!enchant_broker_dict_exists($r, $tag))
  9. die('skip, no dictionary for ' . $tag . ' tag');
  10. ?>
  11. --FILE--
  12. <?php
  13. $tag = 'en_US';
  14. $r = enchant_broker_init();
  15. $d = enchant_broker_request_dict($r, $tag);
  16. enchant_dict_quick_check($d, 'soong', $suggs);
  17. echo "Elements: " . count($suggs) . "\n";
  18. echo "Done\n";
  19. ?>
  20. --EXPECTF--
  21. Elements: %d
  22. Done