diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-13 13:00:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-13 13:01:35 +0100 |
commit | 2cf6778842d259d4e6e1a1f0e4c6c2ceab874eee (patch) | |
tree | 0af2c741e1ad08c218be3a80d3c4e62fbde404ae /i18npool/qa/cppunit | |
parent | 023513fb7186e8837d716e4ed3814d7fdf555fd2 (diff) |
Related: fdo#49629 add test case for #i21907#
Change-Id: Ie1dd9091e4d8ee09c9a75eecf28fd6cd06ea1839
Diffstat (limited to 'i18npool/qa/cppunit')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index a65d0b6955fe..491681c0c4b3 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -166,6 +166,23 @@ void TestBreakIterator::testWordBoundaries() aBounds = m_xBreak->getWordBoundary(aTest, 16, aLocale, i18n::WordType::DICTIONARY_WORD, true); CPPUNIT_ASSERT(aBounds.startPos == 16 && aBounds.endPos == 19); } + + //See https://issues.apache.org/ooo/show_bug.cgi?id=21907 + { + ::rtl::OUString aTest("b a?"); + + CPPUNIT_ASSERT(m_xBreak->isBeginWord(aTest, 1, aLocale, i18n::WordType::ANY_WORD)); + CPPUNIT_ASSERT(m_xBreak->isBeginWord(aTest, 2, aLocale, i18n::WordType::ANY_WORD)); + CPPUNIT_ASSERT(m_xBreak->isBeginWord(aTest, 3, aLocale, i18n::WordType::ANY_WORD)); + + CPPUNIT_ASSERT(m_xBreak->isBeginWord(aTest, 3, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES)); + + CPPUNIT_ASSERT(m_xBreak->isEndWord(aTest, 1, aLocale, i18n::WordType::ANY_WORD)); + CPPUNIT_ASSERT(m_xBreak->isEndWord(aTest, 2, aLocale, i18n::WordType::ANY_WORD)); + CPPUNIT_ASSERT(m_xBreak->isEndWord(aTest, 3, aLocale, i18n::WordType::ANY_WORD)); + + CPPUNIT_ASSERT(m_xBreak->isEndWord(aTest, 3, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES)); + } } //See http://qa.openoffice.org/issues/show_bug.cgi?id=111152 |