Annotation of embedaddon/php/ext/enchant/tests/bug13181.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: bug #13181, leaving a context frees the broker resources
3: --SKIPIF--
4: <?php
5: if(!extension_loaded('enchant')) die('skip, enchant not loader');
6:
7: ?>
8: --FILE--
9: <?php
10: function get_dictionnary() {
11: $rBroker = enchant_broker_init();
12: $t = enchant_broker_request_dict($rBroker, 'en');
13: var_dump($t);
14: return $t;
15: }
16: $rDict = get_dictionnary();
17: var_dump($rDict);
18: enchant_dict_suggest($rDict, "soong");
19:
20: function get_broker() {
21: $t = enchant_broker_init();
22: var_dump($t);
23: return $t;
24: }
25:
26: $rbroker = get_broker();
27: var_dump($rbroker);
28:
29: function get_dict($broker) {
30: $t = enchant_broker_request_dict($broker, 'en');
31: var_dump($t);
32: return $t;
33: }
34: $rDict = get_dict($rbroker);
35: var_dump($rDict);
36: ?>
37: --EXPECTF--
38: resource(%d) of type (enchant_dict)
39: resource(%d) of type (enchant_dict)
40: resource(%d) of type (enchant_broker)
41: resource(%d) of type (enchant_broker)
42: resource(%d) of type (enchant_dict)
43: resource(%d) of type (enchant_dict)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>