dict_quick_check.phpt 791 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. enchant_dict_quick_check() basic test
  3. --CREDITS--
  4. marcosptf - <marcosptf@yahoo.com.br>
  5. --EXTENSIONS--
  6. enchant
  7. --SKIPIF--
  8. <?php
  9. if (getenv('SKIP_ASAN')) die('skip Known libenchant memory leak');
  10. if (!is_object(enchant_broker_init())) {die("skip, resource dont load\n");}
  11. if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, no dictionary installed on this machine! \n");}
  12. $tag = 'en_US';
  13. $r = enchant_broker_init();
  14. if (!enchant_broker_dict_exists($r, $tag))
  15. die('skip, no dictionary for ' . $tag . ' tag');
  16. ?>
  17. --FILE--
  18. <?php
  19. $tag = 'en_US';
  20. $r = enchant_broker_init();
  21. $d = enchant_broker_request_dict($r, $tag);
  22. enchant_dict_quick_check($d, 'soong', $suggs);
  23. echo "Elements: " . count($suggs) . "\n";
  24. echo "Done\n";
  25. ?>
  26. --EXPECTF--
  27. Elements: %d
  28. Done