[Libreoffice-commits] core.git: svl/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 5 23:41:17 UTC 2018


 svl/qa/unit/svl.cxx |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

New commits:
commit 0f1ae0debdcb0d3e80651873b09ad23dfaa90123
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Oct 5 18:09:38 2018 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Sat Oct 6 01:40:52 2018 +0200

    Unit test for de-* Januar/Jänner, tdf#114927
    
    Change-Id: I8f0f3b88e172e93caca4de6d8000cb20c5af8333
    Reviewed-on: https://gerrit.libreoffice.org/61428
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins

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()


More information about the Libreoffice-commits mailing list