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

Appearance settings

Commit 64def09

Browse filesBrowse files
committed
Add regression tests for ispell, synonym and thesaurus dictionaries.
Rename synonym.syn.sample and thesaurs.ths.sample to synonym_sample.syn and thesaurs_sample.ths accordingly to be able to use they in regression test. Ispell dictionary uses synthetic simple dictionary files.
1 parent c4b2b29 commit 64def09
Copy full SHA for 64def09

File tree

Expand file treeCollapse file tree

11 files changed

+514
-14
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+514
-14
lines changed

‎src/backend/tsearch/Makefile

Copy file name to clipboardExpand all lines: src/backend/tsearch/Makefile
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 2006-2007, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.2 2007/08/22 06:11:56 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.3 2007/09/11 11:54:42 teodor Exp $
88
#
99
#-------------------------------------------------------------------------
1010
subdir = src/backend/tsearch
@@ -13,7 +13,8 @@ include $(top_builddir)/src/Makefile.global
1313

1414
DICTDIR=tsearch_data
1515

16-
DICTFILES=synonym.syn.sample thesaurus.ths.sample
16+
DICTFILES=synonym_sample.syn thesaurus_sample.ths hunspell_sample.affix \
17+
ispell_sample.affix ispell_sample.dict
1718

1819
OBJS = ts_locale.o ts_parse.o wparser.o wparser_def.o dict.o \
1920
dict_simple.o dict_synonym.o dict_thesaurus.o \
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
COMPOUNDFLAG Z
2+
ONLYINCOMPOUND L
3+
4+
PFX B Y 1
5+
PFX B 0 re .
6+
7+
PFX U N 1
8+
PFX U 0 un .
9+
10+
SFX J Y 1
11+
SFX J 0 INGS [^E]
12+
13+
SFX G Y 1
14+
SFX G 0 ING [^E]
15+
16+
SFX S Y 1
17+
SFX S 0 S [^SXZHY]
18+
19+
SFX A Y 1
20+
SFX A Y IES [^AEIOU]Y
21+
22+
SFX \ N 1
23+
SFX \ 0 Y/L [^Y]
24+
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
compoundwords controlled Z
2+
3+
prefixes
4+
5+
flag *B:
6+
. > RE # As in enter > reenter
7+
8+
flag U:
9+
. > UN # As in natural > unnatural
10+
11+
suffixes
12+
13+
flag *J:
14+
[^E] > INGS # As in cross > crossings
15+
16+
flag *G:
17+
[^E] > ING # As in cross > crossing
18+
19+
flag *S:
20+
[^SXZHY] > S # As in bat > bats
21+
22+
flag *A:
23+
[^AEIOU]Y > -Y,IES # As in imply > implies
24+
25+
flag ~\\:
26+
[^Y] > Y #~ advarsel > advarsely-
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
book/GJUS
2+
booking/SB
3+
footballklubber
4+
foot/ZS
5+
football/Z
6+
ball/SZ\
7+
klubber/Z
8+
sky/A

‎src/backend/tsearch/synonym.syn.sample

Copy file name to clipboardExpand all lines: src/backend/tsearch/synonym.syn.sample
-3Lines changed: 0 additions & 3 deletions
This file was deleted.
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
postgres pgsql
2+
postgresql pgsql
3+
postgre pgsql
4+
gogle googl

‎src/backend/tsearch/thesaurus.ths.sample renamed to ‎src/backend/tsearch/thesaurus_sample.ths

Copy file name to clipboardExpand all lines: src/backend/tsearch/thesaurus_sample.ths
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ one two : *12
1111
one : *1
1212
two : *2
1313

14-
#foo bar : blah blah
15-
#f bar : fbar
16-
#e bar : ebar
17-
#g bar bar : gbarbar
18-
#asd:sdffff
19-
#qwerty:qwer wert erty
14+
supernovae stars : *sn
15+
supernovae : *sn
16+
booking tickets : order invitation cards
17+
booking the tickets : order invitation Cards
2018

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.