forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbug13181.phpt
64 lines (56 loc) · 1.13 KB
/
bug13181.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--TEST--
bug #13181, leaving a context frees the broker resources
--EXTENSIONS--
enchant
--SKIPIF--
<?php
$broker = enchant_broker_init();
if (!$broker) {
echo "skip: Unable to init broker\n";
exit;
}
if (!enchant_broker_list_dicts($broker)) {
@enchant_broker_free($broker);
echo "skip: No broker dicts installed\n";
}
@enchant_broker_free($broker);
?>
--FILE--
<?php
function get_dictionnary() {
$rBroker = enchant_broker_init();
$t = enchant_broker_request_dict($rBroker, 'en');
var_dump($t);
return $t;
}
$rDict = get_dictionnary();
var_dump($rDict);
enchant_dict_suggest($rDict, "soong");
function get_broker() {
$t = enchant_broker_init();
var_dump($t);
return $t;
}
$rbroker = get_broker();
var_dump($rbroker);
function get_dict($broker) {
$t = enchant_broker_request_dict($broker, 'en');
var_dump($t);
return $t;
}
$rDict = get_dict($rbroker);
var_dump($rDict);
?>
--EXPECTF--
object(EnchantDictionary)#%d (0) {
}
object(EnchantDictionary)#%d (0) {
}
object(EnchantBroker)#%d (0) {
}
object(EnchantBroker)#%d (0) {
}
object(EnchantDictionary)#%d (0) {
}
object(EnchantDictionary)#%d (0) {
}