diff options
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/Make_amiga.mak | 3 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 2 | ||||
-rw-r--r-- | src/testdir/Make_os2.mak | 2 | ||||
-rw-r--r-- | src/testdir/Make_vms.mms | 4 | ||||
-rw-r--r-- | src/testdir/Makefile | 3 | ||||
-rw-r--r-- | src/testdir/test58.in | 135 | ||||
-rw-r--r-- | src/testdir/test58.ok | 32 | ||||
-rw-r--r-- | src/testdir/test59.in | 406 | ||||
-rw-r--r-- | src/testdir/test59.ok | 74 |
9 files changed, 630 insertions, 31 deletions
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak index 1c9d422e8..e9e75e517 100644 --- a/src/testdir/Make_amiga.mak +++ b/src/testdir/Make_amiga.mak @@ -24,7 +24,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \ test38.out test39.out test40.out test41.out test42.out \ test43.out test44.out test45.out test46.out test47.out \ test48.out test51.out test53.out test54.out test55.out \ - test56.out test57.out test58.out + test56.out test57.out test58.out test59.out .SUFFIXES: .in .out @@ -102,3 +102,4 @@ test55.out: test55.in test56.out: test56.in test57.out: test57.in test58.out: test58.in +test59.out: test59.in diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index 1b3c772b4..092b24aac 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -18,7 +18,7 @@ SCRIPTS16 = test1.out test19.out test20.out test22.out \ test35.out test36.out test43.out \ test44.out test45.out test46.out test47.out \ test48.out test51.out test53.out test54.out \ - test55.out test56.out test57.out test58.out + test55.out test56.out test57.out test58.out test59.out SCRIPTS = test3.out test4.out test5.out test6.out test7.out \ test8.out test9.out test11.out test13.out test14.out \ diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak index a771e6a5f..5236922c5 100644 --- a/src/testdir/Make_os2.mak +++ b/src/testdir/Make_os2.mak @@ -24,7 +24,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \ test38.out test39.out test40.out test41.out test42.out \ test43.out test44.out test45.out test46.out test47.out \ test48.out test51.out test53.out test54.out test55.out \ - test56.out test57.out test58.out + test56.out test57.out test58.out test59.out .SUFFIXES: .in .out diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index 1ca1e8b1b..6d08e5041 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -4,7 +4,7 @@ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> # -# Last change: 2005 Jul 04 +# Last change: 2005 Jul 05 # # This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX. # Edit the lines in the Configuration section below to select. @@ -58,7 +58,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \ test38.out test39.out test40.out test41.out test42.out \ test43.out test44.out test45.out test46.out \ test48.out test51.out test53.out test54.out test55.out \ - test56.out test57.out test58.out + test56.out test57.out test58.out test59.out .IFDEF WANT_GUI SCRIPT_GUI = test16.out diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 7fa325f84..433f48711 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -14,7 +14,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \ test38.out test39.out test40.out test41.out test42.out \ test43.out test44.out test45.out test46.out test47.out \ test48.out test49.out test51.out test52.out test53.out \ - test54.out test55.out test56.out test57.out test58.out + test54.out test55.out test56.out test57.out test58.out \ + test59.out SCRIPTS_GUI = test16.out diff --git a/src/testdir/test58.in b/src/testdir/test58.in index 58275a3f1..0575a4440 100644 --- a/src/testdir/test58.in +++ b/src/testdir/test58.in @@ -12,31 +12,46 @@ STARTTEST :" use that spell file :set spl=Xtest.latin1.spl :set spell +:func SpellTest() /^test1: -]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 4) -:$put =string(lst) -`m]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 2) -:$put =string(lst) -`m]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 2) -:$put =string(lst) -`m]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 2) -:$put =string(lst) -`m]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 2) -:$put =string(lst) -`m]smm:let str = spellbadword() -:$put =str -`m:let lst = spellsuggest(str, 2) -:$put =string(lst) +normal ]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 4) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +endfunc +:call SpellTest() :spelldump 1GyG:q :$put @@ -84,6 +99,17 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add `m]s:let str = spellbadword() :$put =str :" +:" Postponed prefixes +gg:/^affstart3/+1,/^affend3/-1w! Xtest.aff +:mkspell! Xtest Xtest +:set spellfile= +:set spl=Xtest.latin1.spl +:mess +:spelldump +1GyG:q +:$put +:call SpellTest() +:" gg:/^test output:/,$wq! test.out ENDTEST @@ -116,6 +142,11 @@ SFX S Y 2 SFX S 0 s [^s] SFX S 0 es s +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + REP 3 REP g ch REP ch g @@ -159,6 +190,11 @@ SFX S Y 2 SFX S 0 s [^s] SFX S 0 es s +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + REP 3 REP g ch REP ch g @@ -284,9 +320,58 @@ SAL ZZ- _ SAL Z S affend2 +affstart3 +SET ISO8859-1 + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +PFXPOSTPONE + +MIDWORD '- + +KEP = +RAR ? +BAD ! + +NOSPLITSUGS + +PFX I N 1 +PFX I 0 in . + +PFX O Y 1 +PFX O 0 out . + +SFX S Y 2 +SFX S 0 s [^s] +SFX S 0 es s + +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + +REP 3 +REP g ch +REP ch g +REP svp s.v.p. + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß +affend3 + dicstart 123456 -test +test/NO # comment wrong Comment diff --git a/src/testdir/test58.ok b/src/testdir/test58.ok index 6de84842c..186b25666 100644 --- a/src/testdir/test58.ok +++ b/src/testdir/test58.ok @@ -19,9 +19,12 @@ input OK output outputs +outtest put puts test +testen +testn the end uk wrong @@ -40,3 +43,32 @@ elequint elekwent elequint elekwint +# file: Xtest.latin1.spl +Comment +deol +déôr +OK +put +input +output +puts +outputs +test +outtest +testen +testn +the end +uk +wrong +inputs +['input', 'puts', 'put', 'outputs'] +comment +['Comment'] +ok +['OK', 'uk'] +Ok +['OK', 'Uk'] +test +['test', 'Test'] +déôl +['deol', 'déôr'] diff --git a/src/testdir/test59.in b/src/testdir/test59.in new file mode 100644 index 000000000..5a3753068 --- /dev/null +++ b/src/testdir/test59.in @@ -0,0 +1,406 @@ +Tests for spell checking with 'encoding' set to "utf-8". vim: set ft=vim : + +STARTTEST +:so small.vim +:so mbyte.vim +:" +:" First generate a .spl file from a .dic and a .aff file. +:set enc=utf-8 +:/^affstart1/+1,/affend1/-1w Xtest.aff +:/^dicstart/+1,/dicend/-1w Xtest.dic +:mkspell Xtest Xtest +:" +:" use that spell file +:set spl=Xtest.utf-8.spl +:set spell +:func SpellTest() +/^test1: +normal ]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 4) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +normal `m]smm +let str = spellbadword() +$put =str +normal `m +let lst = spellsuggest(str, 2) +$put =string(lst) +endfunc +:call SpellTest() +:spelldump +1GyG:q +:$put +:$put =soundfold('goobledygoook') +:$put =soundfold('kóopërÿnôven') +:$put =soundfold('oeverloos gezwets edale') +:" +:" and now with SAL instead of SOFO items; test automatic reloading +gg:/^affstart2/+1,/^affend2/-1w! Xtest.aff +:mkspell! Xtest Xtest +:$put =soundfold('goobledygoook') +:$put =soundfold('kóopërÿnôven') +:$put =soundfold('oeverloos gezwets edale') +:" +:" also use an addition file +gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add +:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add +:set spl=en +:set spellfile=Xtest.utf-8.add +/^test2: +]s:let str = spellbadword() +:$put =str +:set spl=en_us +/^test2: +]smm:let str = spellbadword() +:$put =str +`m]s:let str = spellbadword() +:$put =str +:set spl=en_gb +/^test2: +]smm:let str = spellbadword() +:$put =str +`m]s:let str = spellbadword() +:$put =str +:set spl=en_nz +/^test2: +]smm:let str = spellbadword() +:$put =str +`m]s:let str = spellbadword() +:$put =str +:set spl=en_ca +/^test2: +]smm:let str = spellbadword() +:$put =str +`m]s:let str = spellbadword() +:$put =str +:" +:" Postponed prefixes +gg:/^affstart3/+1,/^affend3/-1w! Xtest.aff +:mkspell! Xtest Xtest +:set spellfile= +:set spl=Xtest.utf-8.spl +:mess +:spelldump +1GyG:q +:$put +:call SpellTest() +:" +gg:/^test output:/,$wq! test.out +ENDTEST + +affstart1 +SET ISO8859-1 +TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ +SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? + +MIDWORD '- + +KEP = +RAR ? +BAD ! + +NOSPLITSUGS + +PFX I N 1 +PFX I 0 in . + +PFX O Y 1 +PFX O 0 out . + +SFX S Y 2 +SFX S 0 s [^s] +SFX S 0 es s + +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + +REP 3 +REP g ch +REP ch g +REP svp s.v.p. + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß +affend1 + +affstart2 +SET ISO8859-1 +TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +MIDWORD '- + +KEP = +RAR ? +BAD ! + +NOSPLITSUGS + +PFX I N 1 +PFX I 0 in . + +PFX O Y 1 +PFX O 0 out . + +SFX S Y 2 +SFX S 0 s [^s] +SFX S 0 es s + +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + +REP 3 +REP g ch +REP ch g +REP svp s.v.p. + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß + +SAL AH(AEIOUY)-^ *H +SAL AR(AEIOUY)-^ *R +SAL A(HR)^ * +SAL A^ * +SAL AH(AEIOUY)- H +SAL AR(AEIOUY)- R +SAL A(HR) _ +SAL À^ * +SAL Å^ * +SAL BB- _ +SAL B B +SAL CQ- _ +SAL CIA X +SAL CH X +SAL C(EIY)- S +SAL CK K +SAL COUGH^ KF +SAL CC< C +SAL C K +SAL DG(EIY) K +SAL DD- _ +SAL D T +SAL É< E +SAL EH(AEIOUY)-^ *H +SAL ER(AEIOUY)-^ *R +SAL E(HR)^ * +SAL ENOUGH^$ *NF +SAL E^ * +SAL EH(AEIOUY)- H +SAL ER(AEIOUY)- R +SAL E(HR) _ +SAL FF- _ +SAL F F +SAL GN^ N +SAL GN$ N +SAL GNS$ NS +SAL GNED$ N +SAL GH(AEIOUY)- K +SAL GH _ +SAL GG9 K +SAL G K +SAL H H +SAL IH(AEIOUY)-^ *H +SAL IR(AEIOUY)-^ *R +SAL I(HR)^ * +SAL I^ * +SAL ING6 N +SAL IH(AEIOUY)- H +SAL IR(AEIOUY)- R +SAL I(HR) _ +SAL J K +SAL KN^ N +SAL KK- _ +SAL K K +SAL LAUGH^ LF +SAL LL- _ +SAL L L +SAL MB$ M +SAL MM M +SAL M M +SAL NN- _ +SAL N N +SAL OH(AEIOUY)-^ *H +SAL OR(AEIOUY)-^ *R +SAL O(HR)^ * +SAL O^ * +SAL OH(AEIOUY)- H +SAL OR(AEIOUY)- R +SAL O(HR) _ +SAL PH F +SAL PN^ N +SAL PP- _ +SAL P P +SAL Q K +SAL RH^ R +SAL ROUGH^ RF +SAL RR- _ +SAL R R +SAL SCH(EOU)- SK +SAL SC(IEY)- S +SAL SH X +SAL SI(AO)- X +SAL SS- _ +SAL S S +SAL TI(AO)- X +SAL TH @ +SAL TCH-- _ +SAL TOUGH^ TF +SAL TT- _ +SAL T T +SAL UH(AEIOUY)-^ *H +SAL UR(AEIOUY)-^ *R +SAL U(HR)^ * +SAL U^ * +SAL UH(AEIOUY)- H +SAL UR(AEIOUY)- R +SAL U(HR) _ +SAL V^ W +SAL V F +SAL WR^ R +SAL WH^ W +SAL W(AEIOU)- W +SAL X^ S +SAL X KS +SAL Y(AEIOU)- Y +SAL ZZ- _ +SAL Z S +affend2 + +affstart3 +SET ISO8859-1 + +FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ +UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ + +PFXPOSTPONE + +MIDWORD '- + +KEP = +RAR ? +BAD ! + +NOSPLITSUGS + +PFX I N 1 +PFX I 0 in . + +PFX O Y 1 +PFX O 0 out . + +SFX S Y 2 +SFX S 0 s [^s] +SFX S 0 es s + +SFX N N 3 +SFX N 0 en [^n] +SFX N 0 nen n +SFX N 0 n . + +REP 3 +REP g ch +REP ch g +REP svp s.v.p. + +MAP 9 +MAP aàáâãäå +MAP eèéêë +MAP iìíîï +MAP oòóôõö +MAP uùúûü +MAP nñ +MAP cç +MAP yÿý +MAP sß +affend3 + +dicstart +123456 +test/NO +# comment +wrong +Comment +OK +uk +put/ISO +the end +deol +déôr +dicend + +addstart +/regions=usgbnz +elequint/2 +elekwint/3 +addend + +test1: +inputs wrong +comment wrong +puts OK +ok wrong +Ok wrong +the end. test wrong +déôl + +test2: +elequint test elekwint test elekwent asdf + + +test output: diff --git a/src/testdir/test59.ok b/src/testdir/test59.ok new file mode 100644 index 000000000..6bbed6e22 --- /dev/null +++ b/src/testdir/test59.ok @@ -0,0 +1,74 @@ +test output: +inputs +['input', 'puts', 'outputs', 'put'] +comment +['Comment'] +ok +['OK', 'uk'] +Ok +['OK', 'Uk'] +test +['test', 'Test'] +déôl +['deol', 'déôr'] +# file: Xtest.utf-8.spl +Comment +deol +déôr +input +OK +output +outputs +outtest +put +puts +test +testen +testn +the end +uk +wrong +gebletegek +kepereneven +everles gesvets etele +kbltykk +kprnfn +*fls kswts tl +elekwent +elequint +elekwint +elekwint +elekwent +elequint +elekwent +elequint +elekwint +# file: Xtest.utf-8.spl +Comment +deol +déôr +OK +put +input +output +puts +outputs +test +outtest +testen +testn +the end +uk +wrong +inputs +['input', 'puts', 'put', 'outputs'] +comment +['Comment'] +ok +['OK', 'uk'] +Ok +['OK', 'Uk'] +test +['test', 'Test'] +déôl +['deol', 'déôr'] |