From 0f1ae0debdcb0d3e80651873b09ad23dfaa90123 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 5 Oct 2018 18:09:38 +0200 Subject: Unit test for de-* Januar/Jänner, tdf#114927 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8f0f3b88e172e93caca4de6d8000cb20c5af8333 Reviewed-on: https://gerrit.libreoffice.org/61428 Reviewed-by: Eike Rathke Tested-by: Jenkins --- svl/qa/unit/svl.cxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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 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 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() -- cgit v1.2.3