diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-07 12:20:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-07 12:21:15 +0100 |
commit | 9b69085c5da49aa64c531b27d078a3f4a353103c (patch) | |
tree | 758f8296b7119d70ad7fbdc4419107cc5e493a4d /i18npool/qa | |
parent | 5e19849479ee25e1ed1c7965588ce5497831614b (diff) |
Related: #i80412# add regression test for Indic language cursoring
Change-Id: Ia1cc6ade8d2122abf5469ec521b2883961121a04
Diffstat (limited to 'i18npool/qa')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index f8f4d7157693..c00b086b8bcf 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -570,8 +570,9 @@ void TestBreakIterator::testWordBoundaries() } } -//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152 //See https://bugs.freedesktop.org/show_bug.cgi?id=40292 +//See https://issues.apache.org/ooo/show_bug.cgi?id=80412 +//See https://issues.apache.org/ooo/show_bug.cgi?id=111152 void TestBreakIterator::testGraphemeIteration() { lang::Locale aLocale; @@ -681,6 +682,24 @@ void TestBreakIterator::testGraphemeIteration() CPPUNIT_ASSERT_MESSAGE("Should be considered 1 grapheme", nGraphemeCount == 1); } + + aLocale.Language = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hi")); + aLocale.Country = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IN")); + + { + const sal_Unicode SHA_VOWELSIGNII[] = { 0x936, 0x940 }; + rtl::OUString aTest(SHA_VOWELSIGNII, SAL_N_ELEMENTS(SHA_VOWELSIGNII)); + + sal_Int32 nDone=0; + sal_Int32 nPos = 0; + + nPos = m_xBreak->nextCharacters(aTest, 0, aLocale, + i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); + CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == SAL_N_ELEMENTS(SHA_VOWELSIGNII)); + nPos = m_xBreak->previousCharacters(aTest, SAL_N_ELEMENTS(SHA_VOWELSIGNII), aLocale, + i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); + CPPUNIT_ASSERT_MESSAGE("Should skip full grapheme", nPos == 0); + } } //A test to ensure that certain ranges and codepoints that are categorized as |