Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2896
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/96/2896/1
unit test for i#116701
Change-Id: Id9a9532d0e02b478f7913bc4a687c38f79a3a322
---
M svl/qa/unit/svl.cxx
1 file changed, 45 insertions(+), 0 deletions(-)
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 26a0b8d..b002e01 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -87,10 +87,12 @@
void testNumberFormat();
void testFdo60915();
+ void testI116701();
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testNumberFormat);
CPPUNIT_TEST(testFdo60915);
+ CPPUNIT_TEST(testI116701);
CPPUNIT_TEST_SUITE_END();
private:
@@ -361,6 +363,49 @@
}
}
+// https://issues.apache.org/ooo/show_bug.cgi?id=116701
+void Test::testI116701()
+{
+ LanguageType eLang = LANGUAGE_CHINESE_TRADITIONAL;
+ OUString sCode, sExpected;
+ double fPreviewNumber = 40573; // equals 30/01/2011
+ SvNumberFormatter aFormatter(m_xContext, eLang);
+ // DateFormatskey25 in i18npool/source/localedata/data/zh_TW.xml
+ sal_Unicode CODE1[] =
+ {
+ 0x0047, 0x0047, 0x0047, 0x0045, 0x0045, // GGGEE
+ 0x0022, 0x5E74, 0x0022,
+ 0x004D, // M
+ 0x0022, 0x6708, 0x0022,
+ 0x0044, // D
+ 0x0022, 0x65E5, 0x0022
+ };
+ sCode = OUString(CODE1, SAL_N_ELEMENTS(CODE1));
+ sal_Unicode EXPECTED[] =
+ {
+ 0x4E2D, 0x83EF, 0x6C11, 0x570B,
+ 0x0031, 0x0030, 0x0030, // 100
+ 0x5E74,
+ 0x0031, // 1
+ 0x6708,
+ 0x0033, 0x0030, // 30
+ 0x65E5
+ };
+ sExpected = OUString(EXPECTED, SAL_N_ELEMENTS(EXPECTED));
+ checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, sExpected);
+ sal_Unicode CODE2[] =
+ {
+ 0x0047, 0x0047, 0x0047, 0x0045, // GGGE
+ 0x0022, 0x5E74, 0x0022,
+ 0x004D, // M
+ 0x0022, 0x6708, 0x0022,
+ 0x0044, // D
+ 0x0022, 0x65E5, 0x0022
+ };
+ sCode = OUString(CODE2, SAL_N_ELEMENTS(CODE2));
+ checkPreviewString(aFormatter, sCode, fPreviewNumber, eLang, sExpected);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
--
To view, visit https://gerrit.libreoffice.org/2896
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9a9532d0e02b478f7913bc4a687c38f79a3a322
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Korrawit Pruegsanusak <detective.conan.1412@gmail.com>
Context
- [PATCH] unit test for i#116701 · Korrawit Pruegsanusak (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.