diff options
author | Laurent BP <laurent.balland-poirier@laposte.net> | 2017-10-20 21:01:33 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-10-23 16:26:55 +0200 |
commit | 9794d194eddf004cc6c27eb25bd889193ada79ad (patch) | |
tree | d0e4f1545ff3fc669aa4f966130d0efb46b71198 /svl | |
parent | ad2f1d2675ce480abf06db280fc551372b3cbed3 (diff) |
tdf#33689 Add QA unit test
Test of English NfKeywords with non-English languages
These tests need https://gerrit.libreoffice.org/43633/
to pass for Finnish
Change-Id: I5e6c3250e6136eeb2e8e25e1f411390e109d5b7e
Reviewed-on: https://gerrit.libreoffice.org/43634
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/svl.cxx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 2ee7f82c943a..db3c1c35d699 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1333,6 +1333,56 @@ void Test::testUserDefinedNumberFormats() sExpected = "1900-01-02 23:53.605"; checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); } + { // tdf#33689 use English NfKeywords in non-English language + eLang = LANGUAGE_DUTCH; + sExpected = "Dutch: 1900/01/02 03:23:54"; + sCode = "\"Dutch:\" JJJJ/MM/DD UU:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Dutch: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_GERMAN; + sExpected = "German: 1900/01/02 03:23:54"; + sCode = "\"German: \"JJJJ/MM/TT HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"German: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_FRENCH; + sExpected = "French: 1900/01/02 03:23:54"; + sCode = "\"French: \"AAAA/MM/JJ HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"French: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_ITALIAN; + sExpected = "Italian: 1900/01/02 03:23:54"; + sCode = "\"Italian: \"AAAA/MM/GG HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Italian: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_PORTUGUESE; + sExpected = "Portuguese: 1900/01/02 03:23:54"; + sCode = "\"Portuguese: \"AAAA/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Portuguese: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_SPANISH_MODERN; + sExpected = "Spanish: 1900/01/02 03:23:54"; + sCode = "\"Spanish: \"AAAA/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Spanish: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_DANISH; + sExpected = "Danish: 1900/01/02 03:23:54"; + sCode = "\"Danish: \"YYYY/MM/DD TT:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Danish: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + eLang = LANGUAGE_FINNISH; + sExpected = "Finnish: 1900/01/02 03:23:54"; + sCode = "\"Finnish: \"VVVV/KK/PP TT:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "\"Finnish: \"YYYY/MM/DD HH:MM:SS"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + } } void Test::testNfEnglishKeywordsIntegrity() |