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/qa | |
parent | 5bc406541c3845985d2239056c35fcfb4e84b093 (diff) |
Related: #i113785# add regression test for ligatures
Change-Id: I46fca6dc8e77571afda5ceb230dc6c93f730703d
Diffstat (limited to 'i18npool/qa')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 22 |
1 files changed, 20 insertions, 2 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 |