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