summaryrefslogtreecommitdiff
path: root/i18npool
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
parentc6943a41a0a8830f9ef6fd25deb6354a52b26774 (diff)
Related: #i107843# add regression test for em-dash/en-dash spell checking
Change-Id: I8d9aad9ac648aefdd1f31e09fe2ea84a698c0013
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx23
-rw-r--r--i18npool/source/breakiterator/data/README7
2 files changed, 23 insertions, 7 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
diff --git a/i18npool/source/breakiterator/data/README b/i18npool/source/breakiterator/data/README
index 95f6b009e911..22136e7ba822 100644
--- a/i18npool/source/breakiterator/data/README
+++ b/i18npool/source/breakiterator/data/README
@@ -16,12 +16,6 @@ latest versions.
to-review, later are ok:
-commit ffdc043d7272d2e0a664f530bbc112f952acadab
-Author: Thomas Lange [tl] <tl@openoffice.org>
-Date: Mon Mar 15 09:22:49 2010 +0100
-
- cws sw321bf01: #i107843# em-dash/en-dash breakiterator fix for spell checking
-
commit e1ad946ef5db3f7c0a540207d0f0fd85799e3b66
Author: Release Engineers <releng@openoffice.org>
Date: Thu Aug 6 18:13:57 2009 +0000
@@ -555,6 +549,7 @@ Date: Mon Mar 8 16:17:05 2004 +0000
done, regression tests added:
+#i107843# em-dash/en-dash breakiterator fix for spell checking
#i103552# Japanese word for 'shutdown' added to ja.dic
#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)