HunspellXML Format (Tests) - TrnsltLife/HunspellXML GitHub Wiki
HunspellXML Format > Tests
The <tests>...</tests>
element may be placed inside the following elements:
<hunspell>...</hunspell>
<prefix>...</prefix>
<suffix>...</suffix>
(Only a single <tests>...</tests>
block may also go directly inside the <hunspell>...</hunspell>
element.)
Each <test>...</tests>
element may contain multiple <good>[list of words]</good>
and <bad>[list of words]</bad>
elements.
Inside the <good>
and <bad>
elements, you can place a list words designed to test whether your prefix, suffix, and other dictionary rules are working correctly.
Words that should show up as correct go inside <good>[list of words]</good>
, and words that are incorrect should go in <bad>[list of words]</bad>
.
All of the <good>
tests will be merged into a file [my_hunspell_dictionary]_good.txt, and all of the <bad>
tests will be merged into a file [my_hunspell_dictionary]_bad.txt. The words in these files will be tested with the generated Hunspell dictionary and any errors will be reported.
<tests>
<good>correct words</good>
<good>more correct words</good>
<bad>imcorrect wordes</bad>
<bad>uncorrect vvords</bad>
</tests>