diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 10:36:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 11:43:50 +0100 |
commit | 2fa8271155450894ed1716a6cce97540950518b0 (patch) | |
tree | 2567447e903a1402d36d68261a98003cad0c7d48 /i18npool | |
parent | 5bc406541c3845985d2239056c35fcfb4e84b093 (diff) |
Related: #i113785# add regression test for ligatures
Change-Id: I46fca6dc8e77571afda5ceb230dc6c93f730703d
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 22 | ||||
-rw-r--r-- | i18npool/source/breakiterator/data/README | 21 |
2 files changed, 23 insertions, 20 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 52dc05f1732c..3fb555dce48e 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -212,7 +212,7 @@ void TestBreakIterator::testWordBoundaries() //See https://issues.apache.org/ooo/show_bug.cgi?id=14904 { - const sal_Unicode TEST1[] = + const sal_Unicode TEST[] = { 'W', 'o', 'r', 'k', 'i', 'n', 'g', ' ', 0x201C, 'W', 'o', 'r', 'd', 's', ' ', 's', 't', 'a', 'r', 't', 'i', 'n', 'g', ' ', 'w', 'i', 't', @@ -223,7 +223,7 @@ void TestBreakIterator::testWordBoundaries() 't', ' ', 'e', 'v', 'e', 'n', ' ' , 0x00BF, 'r', 'e', 'a', 'l', '?', ' ', 'S', 'p', 'a', 'n', 'i', 's', 'h' }; - rtl::OUString aTest(TEST1, SAL_N_ELEMENTS(TEST1)); + rtl::OUString aTest(TEST, SAL_N_ELEMENTS(TEST)); aBounds = m_xBreak->getWordBoundary(aTest, 4, aLocale, i18n::WordType::DICTIONARY_WORD, false); CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 7); @@ -527,6 +527,24 @@ void TestBreakIterator::testWordBoundaries() CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); } } + + //See https://issues.apache.org/ooo/show_bug.cgi?id=113785 + { + aLocale.Language = rtl::OUString("en"); + aLocale.Country = rtl::OUString("US"); + + const sal_Unicode TEST[] = + { + 'r', 'u', 0xFB00, 'l', 'e', ' ', 0xFB01, 's', 'h' + }; + rtl::OUString aTest(TEST, SAL_N_ELEMENTS(TEST)); + + aBounds = m_xBreak->getWordBoundary(aTest, 1, aLocale, i18n::WordType::DICTIONARY_WORD, false); + CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 5); + + aBounds = m_xBreak->getWordBoundary(aTest, 7, aLocale, i18n::WordType::DICTIONARY_WORD, false); + CPPUNIT_ASSERT(aBounds.startPos == 6 && aBounds.endPos == 9); + } } //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 6858f7a538da..4899f6070185 100644 --- a/i18npool/source/breakiterator/data/README +++ b/i18npool/source/breakiterator/data/README @@ -16,24 +16,6 @@ latest versions. to-review, later are ok: -commit 681082b57612ef325c7f695846369d44c68dda11 -Author: Caolán McNamara <caolanm@redhat.com> -Date: Sat Jan 29 12:51:52 2011 +0000 - - Resolves: fdo#31271 wrong line break with ( - -commit 42be5541baf18e3292a14a9d478eda33f61e10ab -Author: Mattias Johnsson <m.t.johnsson@gmail.com> -Date: Thu Nov 4 23:25:02 2010 +1100 - - An opening quote should not be counted as a word by word count tool - -commit 600c6460a6ffa169ad0cc9bed4b77c545cc50f52 -Author: Thomas Lange [tl] <tl@openoffice.org> -Date: Tue Aug 24 16:46:29 2010 +0200 - - cws tl82: #i113785# ligatures for spell checking will no longer break words - commit ae9d7c2cef9ecd42687d64f985b9e2dcbc68a034 Author: Thomas Lange [tl] <tl@openoffice.org> Date: Tue Apr 27 10:09:22 2010 +0200 @@ -579,6 +561,9 @@ Date: Mon Mar 8 16:17:05 2004 +0000 done, regression tests added: +#i113785# ligatures for spell checking will no longer break words +An opening quote should not be counted as a word by word count tool (regression test in in writer) +fdo#31271 wrong line break with ( #i89042# word count fix (regression test is in writer) #i58513# add break iterator rules for Finish #i19716# fix wrong line break on bracket characters |