summaryrefslogtreecommitdiff
path: root/i18npool/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-07 09:17:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-07 10:04:05 +0100
commit08de755c078b96922ea7693553e4f4b5e7bab740 (patch)
treee64c12a2db27d2fc40ff1ddf604df158af1373aa /i18npool/qa
parentc6943a41a0a8830f9ef6fd25deb6354a52b26774 (diff)
Related: #i107843# add regression test for em-dash/en-dash spell checking
Change-Id: I8d9aad9ac648aefdd1f31e09fe2ea84a698c0013
Diffstat (limited to 'i18npool/qa')
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 2073a9d30190..f8f4d7157693 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -530,7 +530,7 @@ void TestBreakIterator::testWordBoundaries()
}
}
- //See https://issues.apache.org/ooo/show_bug.cgi?id=113785
+ //See https://issues.apache.org/ooo/show_bug.cgi?id=107843
{
aLocale.Language = rtl::OUString("en");
aLocale.Country = rtl::OUString("US");
@@ -547,6 +547,27 @@ void TestBreakIterator::testWordBoundaries()
aBounds = m_xBreak->getWordBoundary(aTest, 7, aLocale, i18n::WordType::DICTIONARY_WORD, false);
CPPUNIT_ASSERT(aBounds.startPos == 6 && aBounds.endPos == 9);
}
+
+ //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[] =
+ {
+ 'a', 0x2013, 'b', 0x2014, 'c'
+ };
+ rtl::OUString aTest(TEST, SAL_N_ELEMENTS(TEST));
+
+ aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, i18n::WordType::DICTIONARY_WORD, true);
+ CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 1);
+
+ aBounds = m_xBreak->nextWord(aTest, 0, aLocale, i18n::WordType::DICTIONARY_WORD);
+ CPPUNIT_ASSERT(aBounds.startPos == 2 && aBounds.endPos == 3);
+
+ aBounds = m_xBreak->nextWord(aTest, aBounds.endPos, aLocale, i18n::WordType::DICTIONARY_WORD);
+ CPPUNIT_ASSERT(aBounds.startPos == 4 && aBounds.endPos == 5);
+ }
}
//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152