Skip to content

Commit

Permalink
Add a circumfix test and a failing test from #93
Browse files Browse the repository at this point in the history
Circumfix test xfails, added flags test fails
  • Loading branch information
tgross35 committed Dec 10, 2023
1 parent 364c343 commit 990a860
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
48 changes: 48 additions & 0 deletions zspell/test-suite/h-circumfix.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
%% SPDX-License-Identifier: MPL-1.1
%% https://github.com/hunspell/hunspell/blob/3cfd539b5b1033620b12663ee3f1d673d193add0/tests/circumfix.aff

==== afx ====
# circumfixes: ~ obligate prefix/suffix combinations
# superlative in Hungarian: leg- (prefix) AND -bb (suffix)

CIRCUMFIX X

PFX A Y 1
PFX A 0 leg/X .

PFX B Y 1
PFX B 0 legesleg/X .

SFX C Y 3
SFX C 0 obb . is:COMPARATIVE
SFX C 0 obb/AX . is:SUPERLATIVE
SFX C 0 obb/BX . is:SUPERSUPERLATIVE

==== dic ====
1
nagy/C po:adj

==== valid ====
nagy
nagyobb

%% FIXME(circumfix): xfail
%% legnagyobb
%% legeslegnagyobb


==== stem ====
nagy > nagy
nagyobb > nagy

%% FIXME(circumfix): xfail
%% legnagyobb > nagy
%% legeslegnagyobb > nagy

==== morph ====
nagy > po:adj
nagyobb > po:adj is:COMPARATIVE

%% FIXME(circumfix): xfail
%% legnagyobb > fl:A po:adj is:SUPERLATIVE
%% legeslegnagyobb > fl:B po:adj is:SUPERSUPERLATIVE
30 changes: 30 additions & 0 deletions zspell/test-suite/i93-separate-dict-afx-flags.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
%% SPDX-License-Identifier: GPL-2.0-or-later
%% Flags that apply to dictionary items and flags that apply to other things in
%% the affix file have separate namespaces.
%%
%% Examples come from the German dictionary
%% <https://github.com/wooorm/dictionaries/blob/836d7c2032167880e639a1fe522748733e528c2d/dictionaries/de/index.aff>


==== afx ====
# Afffix using `f`
SFX f Y 4
SFX f ph f ph
SFX f ph fen ph
SFX f phie fie phie
SFX f phie fien phie

# Meta flag using `f`
# Affixes signed with CIRCUMFIX flag may be on a word when this word also has
# a prefix with CIRCUMFIX flag and vice versa.
# for decapitalizing nouns with fogemorphemes
CIRCUMFIX f

# Affix that adds the flag `f`
# for Uppercased end-words to prepend - and lowercase: (Tier/EPSm) (EX: Bettbezüge und *-laken*)
# AND
# for lowercased end-words to prepend - and re-uppercase : (tier/EPSozm) (EX: Arbeits*-Tier*)
PFX m Y 1
PFX m f -F/co f

%% FIXME(added flags): affixes need to be able to add flags

0 comments on commit 990a860

Please sign in to comment.