diff options
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 40 | ||||
-rw-r--r-- | i18npool/source/breakiterator/data/README | 8 |
2 files changed, 41 insertions, 7 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index e03fbe40452a..52dc05f1732c 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -487,6 +487,46 @@ void TestBreakIterator::testWordBoundaries() while (nPos++ < aTest.getLength()); CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); } + + //See https://issues.apache.org/ooo/show_bug.cgi?id=58513 + { + aLocale.Language = "fi"; + aLocale.Country = "FI"; + + rtl::OUString aTest("Kuorma-auto kaakkois- ja Keski-Suomi"); + + { + sal_Int32 nPos = 0; + sal_Int32 aExpected[] = {12, 22, 25, 36}; + size_t i = 0; + do + { + CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aExpected)); + nPos = m_xBreak->getWordBoundary(aTest, nPos, aLocale, + i18n::WordType::WORD_COUNT, true).endPos; + CPPUNIT_ASSERT(aExpected[i++] == nPos); + } + while (nPos++ < aTest.getLength()); + CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); + } + + { + sal_Int32 nPos = 0; + sal_Int32 aExpected[] = {0, 11, 12, 21, 22, 24, 25, 36}; + size_t i = 0; + do + { + CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aExpected)); + aBounds = m_xBreak->getWordBoundary(aTest, nPos, aLocale, + i18n::WordType::DICTIONARY_WORD, true); + CPPUNIT_ASSERT(aExpected[i++] == aBounds.startPos); + CPPUNIT_ASSERT(aExpected[i++] == aBounds.endPos); + nPos = aBounds.endPos; + } + while (nPos++ < aTest.getLength()); + CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); + } + } } //See http://qa.openoffice.org/issues/show_bug.cgi?id=111152 diff --git a/i18npool/source/breakiterator/data/README b/i18npool/source/breakiterator/data/README index e50b0613eda5..7d67cf0c6766 100644 --- a/i18npool/source/breakiterator/data/README +++ b/i18npool/source/breakiterator/data/README @@ -354,13 +354,6 @@ Date: Tue Oct 24 12:53:13 2006 +0000 INTEGRATION: CWS tl29 (1.12.24); FILE MERGED 2006/09/20 01:24:53 khong 1.12.24.1: #i69482# fixed mismatch of nextWord and getWordBoundary -commit be43820c99d96a9e03e2ec5871f6259283b53b58 -Author: RĂ¼diger Timm <rt@openoffice.org> -Date: Thu May 4 08:11:17 2006 +0000 - - INTEGRATION: CWS locales203 (1.1.2); FILE ADDED - 2006/04/25 22:47:02 khong 1.1.2.1: #i58513 add break iterator rules for Finish - commit 97d89862a2285071202cc8010d888ffcbf96279a Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Thu Nov 17 19:30:35 2005 +0000 @@ -592,6 +585,7 @@ Date: Mon Mar 8 16:17:05 2004 +0000 done, regression tests added: +#i58513# add break iterator rules for Finish #i19716# fix wrong line break on bracket characters #i21290# extend Greek script type #i21907# fix isBeginWord and isEndWord problem |