[Libreoffice-commits] .: i18npool/qa i18npool/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 19 06:39:39 PDT 2012


 i18npool/qa/cppunit/test_breakiterator.cxx |   28 +++++++++++++++++++++++-----
 i18npool/source/breakiterator/data/README  |    8 +-------
 2 files changed, 24 insertions(+), 12 deletions(-)

New commits:
commit 558476135865d9ae7b8801a82c177fd1098386ff
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 19 09:10:56 2012 +0100

    Related: #112623# add regression test for japanese word break rules
    
    Change-Id: I05baf163cc00d3770b9a8b25b099ffcbd9623a2f

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index aa4e943..a6bc2cd 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -898,14 +898,32 @@ void TestBreakIterator::testJapanese()
     lang::Locale aLocale;
     aLocale.Language = OUString("ja");
     aLocale.Country = OUString("JP");
+    i18n::Boundary aBounds;
 
-    const sal_Unicode JAPANESE[] = { 0x30B7, 0x30E3, 0x30C3, 0x30C8, 0x30C0, 0x30A6, 0x30F3 };
+    {
+        const sal_Unicode JAPANESE[] = { 0x30B7, 0x30E3, 0x30C3, 0x30C8, 0x30C0, 0x30A6, 0x30F3 };
 
-    rtl::OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE));
-    i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale,
-        i18n::WordType::DICTIONARY_WORD, true);
+        rtl::OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE));
+        aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale,
+            i18n::WordType::DICTIONARY_WORD, true);
 
-    CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 7);
+        CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 7);
+    }
+
+    {
+        const sal_Unicode JAPANESE[] = { 0x9EBB, 0x306E, 0x8449, 0x9EBB, 0x306E, 0x8449 };
+
+        rtl::OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE));
+        aBounds = m_xBreak->getWordBoundary(aTest, 1, aLocale,
+            i18n::WordType::DICTIONARY_WORD, true);
+
+        CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 3);
+
+        aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale,
+            i18n::WordType::DICTIONARY_WORD, true);
+
+        CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 6);
+    }
 }
 
 void TestBreakIterator::setUp()
diff --git a/i18npool/source/breakiterator/data/README b/i18npool/source/breakiterator/data/README
index 2b4e7cd..f1a05c9 100644
--- a/i18npool/source/breakiterator/data/README
+++ b/i18npool/source/breakiterator/data/README
@@ -495,13 +495,6 @@ Date:   Fri May 28 15:33:02 2004 +0000
     2004/04/30 11:25:47 er 1.13.22.2: RESYNC: (1.13-1.14); FILE MERGED
     2004/04/13 11:55:32 er 1.13.22.1: #i27711# Hungarian breakiterator
 
-commit 170eb11a6d894ace40b2e4708264b0142ac4e603
-Author: Oliver Bolte <obo at openoffice.org>
-Date:   Wed Mar 17 08:02:36 2004 +0000
-
-    INTEGRATION: CWS i18n11 (1.1.124); FILE MERGED
-    2004/01/06 19:36:16 khong 1.1.124.1: #112623# update Japanese word breakiterator dictionary
-
 commit f5bc5f04e4de8fa502d498a99f4ef6a340d796c0
 Author: Oliver Bolte <obo at openoffice.org>
 Date:   Wed Mar 17 08:02:14 2004 +0000
@@ -529,6 +522,7 @@ Date:   Mon Mar 8 16:17:05 2004 +0000
 
 done, regression tests added:
 
+#112623# update Japanese word breakiterator dictionary
 #i50172# add cell breakiterator rule for Tamil
 #i80412# indic cursoring
 #i107843# em-dash/en-dash breakiterator fix for spell checking


More information about the Libreoffice-commits mailing list