diff options
author | Eike Rathke <erack@redhat.com> | 2018-10-05 18:09:38 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-10-06 01:40:52 +0200 |
commit | 0f1ae0debdcb0d3e80651873b09ad23dfaa90123 (patch) | |
tree | 3b5f6d65798c650a57daab92c53cbb92c6163cd1 /svl | |
parent | 692c26408ca3a5d9cc34a07e3a34ac0b2d87d920 (diff) |
Unit test for de-* Januar/Jänner, tdf#114927
Change-Id: I8f0f3b88e172e93caca4de6d8000cb20c5af8333
Reviewed-on: https://gerrit.libreoffice.org/61428
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/svl.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index daf5fa2a763e..5c14f6539baa 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1266,6 +1266,36 @@ void Test::testIsNumberFormatSpecific() checkSpecificNumberFormats( aFormatter, aIO, "[es-ES] date"); } + + { + // Test that de-DE accepts Januar and Jänner. + SvNumberFormatter aFormatter(m_xContext, LANGUAGE_GERMAN); + + const sal_uInt32 n = aFormatter.GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_GERMAN); + std::vector<FormatInputOutput> aIO = { + { "23. Januar 1999", true, "23.01.1999", n }, + { "23. J\xC3\xA4nner 1999", true, "23.01.1999", n }, + { "23. Jan. 1999", true, "23.01.1999", n }, + { "23. J\xC3\xA4n. 1999", true, "23.01.1999", n }, + }; + + checkSpecificNumberFormats( aFormatter, aIO, "[de-DE] date January month names"); + } + + { + // Test that de-AT accepts Januar and Jänner. + SvNumberFormatter aFormatter(m_xContext, LANGUAGE_GERMAN_AUSTRIAN); + + const sal_uInt32 n = aFormatter.GetFormatIndex( NF_DATE_SYS_DDMMYYYY, LANGUAGE_GERMAN_AUSTRIAN); + std::vector<FormatInputOutput> aIO = { + { "23. Januar 1999", true, "23.01.1999", n }, + { "23. J\xC3\xA4nner 1999", true, "23.01.1999", n }, + { "23. Jan. 1999", true, "23.01.1999", n }, + { "23. J\xC3\xA4n. 1999", true, "23.01.1999", n }, + }; + + checkSpecificNumberFormats( aFormatter, aIO, "[de-AT] date January month names"); + } } void Test::testUserDefinedNumberFormats() |