summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-27 15:06:51 +0100
committerDavid Ostrovsky <david@ostrovsky.org>2012-07-27 17:20:03 +0200
commita79891fca88d2bc0414c439208b81f4dfa47b99a (patch)
treea15e7e07b419630b71852795a6bbb9ca849f3b47
parentgtk3: ensure we re-render native commits (diff)
downloadcore-a79891fca88d2bc0414c439208b81f4dfa47b99a.tar.gz
core-a79891fca88d2bc0414c439208b81f4dfa47b99a.zip
add regression test for #i21290
Change-Id: Ic60f440f8dc8fcfa76a023557e76fcf8e3c52476
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx41
-rw-r--r--i18npool/source/breakiterator/data/README19
2 files changed, 43 insertions, 17 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index b04dc531ebec..23a4092d4fc6 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -435,6 +435,47 @@ void TestBreakIterator::testWordBoundaries()
while (nPos++ < aTest.getLength());
CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected));
}
+
+ //https://issues.apache.org/ooo/show_bug.cgi?id=21290
+ for (int j = 0; j < 2; ++j)
+ {
+ switch (j)
+ {
+ case 0:
+ aLocale.Language = rtl::OUString("en");
+ aLocale.Country = rtl::OUString("US");
+ break;
+ case 1:
+ aLocale.Language = rtl::OUString("grc");
+ aLocale.Country = rtl::OUString();
+ break;
+ default:
+ CPPUNIT_ASSERT(false);
+ break;
+ }
+
+ const sal_Unicode TEST[] =
+ {
+ 0x1F0C, 0x03BD, 0x03B4, 0x03C1, 0x03B1, 0x0020, 0x1F00,
+ 0x03C1, 0x03BD, 0x1F7B, 0x03BC, 0x03B5, 0x03BD, 0x03BF,
+ 0x03C2, 0x0020, 0x1F00, 0x03BB, 0x03BB, 0x0020, 0x1F24,
+ 0x03C3, 0x03B8, 0x03B9, 0x03BF, 0x03BD
+ };
+ rtl::OUString aTest(TEST, SAL_N_ELEMENTS(TEST));
+
+ sal_Int32 nPos = 0;
+ sal_Int32 aExpected[] = {5, 15, 19, 26};
+ size_t i = 0;
+ do
+ {
+ CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aExpected));
+ nPos = m_xBreak->getWordBoundary(aTest, nPos, aLocale,
+ i18n::WordType::DICTIONARY_WORD, true).endPos;
+ CPPUNIT_ASSERT(aExpected[i++] == nPos);
+ }
+ 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 b058a2d575e3..6e26445a41a5 100644
--- a/i18npool/source/breakiterator/data/README
+++ b/i18npool/source/breakiterator/data/README
@@ -602,25 +602,10 @@ Date: Mon Mar 8 16:16:16 2004 +0000
INTEGRATION: CWS i18n09 (1.2.2); FILE MERGED
2003/12/03 02:17:54 khong 1.2.2.1: #110105# Set word boundary between CJK and Latin script type
-commit f0939f43315a21f5134cd631773ddae7cfef4493
-Author: Jens-Heiner Rechtien <hr@openoffice.org>
-Date: Mon Mar 8 16:16:04 2004 +0000
-
- INTEGRATION: CWS i18n09 (1.12.2); FILE MERGED
- 2003/12/09 19:35:48 khong 1.12.2.4: #112021# fix word boundary problem on begining and end of the string
- 2003/12/08 23:47:26 khong 1.12.2.3: #i21907# fix isBeginWord and isEndWord problem
- 2003/11/18 22:55:08 khong 1.12.2.2: #i21290# #i22530# #i14640# extend CTL script support, extend Greek script type
- 2003/11/18 22:31:59 khong 1.12.2.1: #i21290# #i22530# #i14640# extend CTL script support, extend Greek script type
-
-commit 8311f89a42e6a4b8147191880470da415c9d7483
-Author: Rüdiger Timm <rt@openoffice.org>
-Date: Tue Jan 20 12:20:28 2004 +0000
-
- INTEGRATION: CWS i18n10 (1.12.4); FILE MERGED
- 2003/12/17 20:15:43 khong 1.12.4.1: #i22138# #112506# migrate to ICU collator and remove link to tool library
-
done, regression tests added:
+#i21290# extend Greek script type
+#i21907# fix isBeginWord and isEndWord problem
#i85411# Apply patch for ZWSP
#i17155# fix line breakiterator rule to make slash and hyphen as part of word when doing line break
#i13451# add '-' as midLetter for Catalan dictionary word breakiterator