Hi Felipe,

as I promised, I'm sending some tests. I am sending a file with your preferred format test cases (sorry, it is not a patch for testunicode.pas). Sorry, I didn't test them because I do not want to update from my current used revision... I think for 1, 2 and 3 tests there will be no problems. Tests number 4 are interesting because some non composite upper case letters should be translated to composite symbols and vice versa. But I should mention that only characters in test number 1 are used in everyday life. Other tests cases are for accented characters which are used in linguistic texts (eg. dictionaries).

Feel free to ask if you have any questions.


Regards,
Žilvinas Ledas



On 2011-10-20 00:03, Felipe Monteiro de Carvalho wrote:
Hello,

2011/10/19 Žilvinas Ledas<[email protected]>:
I am native Lithuanian so I think can help at least providing info, but I
must understand what is the problem first.
I am mostly interested in LowerCase / UpperCase. Could you explain how
it works in Lithuanian and provide test cases for it?

Test cases should be in this format:

   AssertStringOperationUTF8LowerCase('Unicode 0460 UTF8LowerCase', '',
'ѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯ', 'ѡѡѣѣѥѥѧѧѩѩѫѫѭѭѯѯ');

Even better if they are in patches to the file
lazarus/tests/lazutils/testunicode.pas

First param is the label, the second the locale (in this case maybe
something like 'lt', what is the ISO identifier for lituanian? Then
UpperCase and then LowerCase.

And try to make some tricky tests, to defeat partial implementations.
3 tests for lowercase and 3 for uppercase should be enough

// tests for Lithuanian language
AssertStringOperationUTF8LowerCase('Lithuanian UTF8LowerCase 1 (basic)', 'lt', 
'Ą/ą,Č/č,Ę/ę,Ė/ė,Į/į,Š/š,Ų/ų,Ū/ū,Ž/ž„“–', 
'ą/ą,č/č,ę/ę,ė/ė,į/į,š/š,ų/ų,ū/ū,ž/ž„“–');
AssertStringOperationUTF8LowerCase('Lithuanian UTF8LowerCase 2 (accented 
simple)', 'lt', 
'áàãéèẽýỹñóòõúùũÁÀÃÉÈẼÝỸÑÓÒÕÚÙŨ', 
'áàãéèẽýỹñóòõúùũáàãéèẽýỹñóòõúùũ');
AssertStringOperationUTF8LowerCase('Lithuanian UTF8LowerCase 3 (accented simple 
composites)', 'lt', 
'Ą́Ą̃Ę́Ę̃Ė́Ė̃L̃M̃R̃Ų́Ų̃Ū́Ū̃ą́ą̃ę́ę̃ė́ė̃l̃m̃r̃ų́ų̃ū́ū̃',
 
'ą́ą̃ę́ę̃ė́ė̃l̃m̃r̃ų́ų̃ū́ū̃ą́ą̃ę́ę̃ė́ė̃l̃m̃r̃ų́ų̃ū́ū̃');
AssertStringOperationUTF8LowerCase('Lithuanian UTF8LowerCase 4 (accented 
complex composites)', 'lt', 
'ÍÌĨĮ́Į̃J̃i̇́i̇̀i̇̃į̇́į̇̃j̇̃', 
'i̇́i̇̀i̇̃į̇́į̇̃j̇̃i̇́i̇̀i̇̃į̇́į̇̃j̇̃');

AssertStringOperationUTF8UpperCase('Lithuanian UTF8UpperCase 1 (basic)', 'lt', 
'Ą/ą,Č/č,Ę/ę,Ė/ė,Į/į,Š/š,Ų/ų,Ū/ū,Ž/ž„“–', 
'Ą/Ą,Č/Č,Ę/Ę,Ė/Ė,Į/Į,Š/Š,Ų/Ų,Ū/Ū,Ž/Ž„“–');
AssertStringOperationUTF8UpperCase('Lithuanian UTF8UpperCase 2 (accented 
simple)', 'lt', 
'áàãéèẽýỹñóòõúùũÁÀÃÉÈẼÝỸÑÓÒÕÚÙŨ', 
'ÁÀÃÉÈẼÝỸÑÓÒÕÚÙŨÁÀÃÉÈẼÝỸÑÓÒÕÚÙŨ');
AssertStringOperationUTF8UpperCase('Lithuanian UTF8UpperCase 3 (accented simple 
composites)', 'lt', 
'ą́ą̃ę́ę̃ė́ė̃l̃m̃r̃ų́ų̃ū́ū̃Ą́Ą̃Ę́Ę̃Ė́Ė̃L̃M̃R̃Ų́Ų̃Ū́Ū̃',
 
'Ą́Ą̃Ę́Ę̃Ė́Ė̃L̃M̃R̃Ų́Ų̃Ū́Ū̃Ą́Ą̃Ę́Ę̃Ė́Ė̃L̃M̃R̃Ų́Ų̃Ū́Ū̃');
AssertStringOperationUTF8UpperCase('Lithuanian UTF8UpperCase 4 (accented 
complex composites)', 'lt', 
'i̇́i̇̀i̇̃į̇́į̇̃j̇̃ÍÌĨĮ́Į̃J̃', 
'ÍÌĨĮ́Į̃J̃ÍÌĨĮ́Į̃J̃');

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to