Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f3a11b

Browse files
author
Artur Zakirov
committed
Tests fixes
1 parentc5e3da5 commit9f3a11b

File tree

3 files changed

+18
-67
lines changed

3 files changed

+18
-67
lines changed

‎contrib/shared_ispell/expected/shared_ispell.out

Lines changed: 17 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
CREATE EXTENSION shared_ispell;
2-
SELECT shared_ispell_mem_available();
3-
shared_ispell_mem_available
4-
-----------------------------
5-
1048528
6-
(1 row)
7-
8-
SELECT shared_ispell_mem_used();
9-
shared_ispell_mem_used
10-
------------------------
11-
48
12-
(1 row)
13-
142
-- Test ISpell dictionary with ispell affix file
153
CREATE TEXT SEARCH DICTIONARY shared_ispell (
164
Template=shared_ispell,
@@ -60,12 +48,6 @@ SELECT ts_lexize('shared_ispell', 'rebooking');
6048
{booking,book}
6149
(1 row)
6250

63-
SELECT ts_lexize('shared_ispell', 'rebook');
64-
ts_lexize
65-
-----------
66-
67-
(1 row)
68-
6951
SELECT ts_lexize('shared_ispell', 'unbookings');
7052
ts_lexize
7153
-----------
@@ -108,18 +90,6 @@ SELECT ts_lexize('shared_ispell', 'footballyklubber');
10890
{foot,ball,klubber}
10991
(1 row)
11092

111-
SELECT shared_ispell_mem_available();
112-
shared_ispell_mem_available
113-
-----------------------------
114-
980312
115-
(1 row)
116-
117-
SELECT shared_ispell_mem_used();
118-
shared_ispell_mem_used
119-
------------------------
120-
68264
121-
(1 row)
122-
12393
-- Test ISpell dictionary with hunspell affix file
12494
CREATE TEXT SEARCH DICTIONARY shared_hunspell (
12595
Template=shared_ispell,
@@ -168,12 +138,6 @@ SELECT ts_lexize('shared_hunspell', 'rebooking');
168138
{booking,book}
169139
(1 row)
170140

171-
SELECT ts_lexize('shared_hunspell', 'rebook');
172-
ts_lexize
173-
-----------
174-
175-
(1 row)
176-
177141
SELECT ts_lexize('shared_hunspell', 'unbookings');
178142
ts_lexize
179143
-----------
@@ -216,29 +180,17 @@ SELECT ts_lexize('shared_hunspell', 'footballyklubber');
216180
{foot,ball,klubber}
217181
(1 row)
218182

219-
SELECT shared_ispell_mem_available();
220-
shared_ispell_mem_available
221-
-----------------------------
222-
914208
223-
(1 row)
224-
225-
SELECT shared_ispell_mem_used();
226-
shared_ispell_mem_used
227-
------------------------
228-
134368
229-
(1 row)
230-
231-
SELECT * FROM shared_ispell_dicts();
232-
dict_name | affix_name | words | affixes | bytes
233-
---------------+-----------------+-------+---------+-------
234-
ispell_sample | hunspell_sample | 8 | 0 | 66104
235-
ispell_sample | ispell_sample | 8 | 0 | 66104
183+
SELECT dict_name, affix_name, words, affixes FROM shared_ispell_dicts();
184+
dict_name | affix_name | words | affixes
185+
---------------+-----------------+-------+---------
186+
ispell_sample | hunspell_sample | 8 | 7
187+
ispell_sample | ispell_sample | 8 | 7
236188
(2 rows)
237189

238-
SELECT* FROM shared_ispell_stoplists();
239-
stop_name | words| bytes
240-
-----------+-------+-------
241-
english | 127 | 2112
190+
SELECTstop_name, words FROM shared_ispell_stoplists();
191+
stop_name | words
192+
-----------+-------
193+
english | 127
242194
(1 row)
243195

244196
SELECT shared_ispell_reset();
@@ -247,15 +199,15 @@ SELECT shared_ispell_reset();
247199

248200
(1 row)
249201

250-
SELECTshared_ispell_mem_available();
251-
shared_ispell_mem_available
252-
-----------------------------
253-
1048528
202+
SELECTts_lexize('shared_ispell', 'skies');
203+
ts_lexize
204+
-----------
205+
{sky}
254206
(1 row)
255207

256-
SELECTshared_ispell_mem_used();
257-
shared_ispell_mem_used
258-
------------------------
259-
48
208+
SELECTts_lexize('shared_hunspell', 'skies');
209+
ts_lexize
210+
-----------
211+
{sky}
260212
(1 row)
261213

‎contrib/shared_ispell/sql/shared_ispell.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ SELECT ts_lexize('shared_ispell', 'foot');
1515
SELECT ts_lexize('shared_ispell','foots');
1616
SELECT ts_lexize('shared_ispell','rebookings');
1717
SELECT ts_lexize('shared_ispell','rebooking');
18-
SELECT ts_lexize('shared_ispell','rebook');
1918
SELECT ts_lexize('shared_ispell','unbookings');
2019
SELECT ts_lexize('shared_ispell','unbooking');
2120
SELECT ts_lexize('shared_ispell','unbook');
@@ -39,7 +38,6 @@ SELECT ts_lexize('shared_hunspell', 'foot');
3938
SELECT ts_lexize('shared_hunspell','foots');
4039
SELECT ts_lexize('shared_hunspell','rebookings');
4140
SELECT ts_lexize('shared_hunspell','rebooking');
42-
SELECT ts_lexize('shared_hunspell','rebook');
4341
SELECT ts_lexize('shared_hunspell','unbookings');
4442
SELECT ts_lexize('shared_hunspell','unbooking');
4543
SELECT ts_lexize('shared_hunspell','unbook');

‎contrib/shared_ispell/src/shared_ispell.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ init_shared_dict(DictInfo *info, char *dictFile, char *affFile, char *stopFile)
347347

348348
/* fine, there's enough space - copy the dictionary */
349349
shdict=copyIspellDict(dict,dictFile,affFile,size,dict->nspell);
350+
shdict->dict.naffixes=info->dict.naffixes;
350351

351352
/* add the new dictionary to the linked list (of SharedIspellDict structures) */
352353
shdict->next=segment_info->shdict;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp