summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-27 15:27:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-27 15:45:27 +0100
commitdb8853d7a534941ac82b0bec753fa9509e5e3e0d (patch)
tree3a981c7555075ee7e8beade5d1074471d3d12adb
parent2cf7896039fa883901c0524ecbb71dca790bdb84 (diff)
add regression test for #i19716#
Change-Id: I11440667bdf73ed09ebc83771acf33e2d3e61f6c
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx16
-rw-r--r--i18npool/source/breakiterator/data/README16
2 files changed, 17 insertions, 15 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 23a4092d4fc6..89b947f57642 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -140,6 +140,22 @@ void TestBreakIterator::testLineBreaking()
CPPUNIT_ASSERT_MESSAGE("Expected a break at the first slash", aResult.breakIndex == 4);
}
}
+
+ //See https://issues.apache.org/ooo/show_bug.cgi?id=19716
+ {
+ rtl::OUString aTest(RTL_CONSTASCII_USTRINGPARAM("aaa]aaa"));
+
+ aLocale.Language = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
+ aLocale.Country = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
+
+ {
+ //Here we want the line break to move the whole lot to the next line
+ i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest, aTest.getLength()-2, aLocale, 0,
+ aHyphOptions, aUserOptions);
+ fprintf(stderr, "suggestion was %d\n", aResult.breakIndex);
+ CPPUNIT_ASSERT_MESSAGE("Expected a break at the start of the line, not at ]", aResult.breakIndex == 0);
+ }
+ }
}
//See https://bugs.freedesktop.org/show_bug.cgi?id=49629
diff --git a/i18npool/source/breakiterator/data/README b/i18npool/source/breakiterator/data/README
index 6e26445a41a5..8967c73a661f 100644
--- a/i18npool/source/breakiterator/data/README
+++ b/i18npool/source/breakiterator/data/README
@@ -586,24 +586,10 @@ Date: Mon Mar 8 16:17:05 2004 +0000
INTEGRATION: CWS i18n09 (1.2.2); FILE MERGED
2003/12/04 23:45:37 khong 1.2.2.3: #i22602# make dot stick on beginning of a word when doing line break
2003/12/04 23:12:37 khong 1.2.2.2: #i21392# change line break rule to match with MS office
- 2003/12/03 19:32:02 khong 1.2.2.1: #i19716# fix wrong line break on bracket characters
-
-commit 15f41851842866c9a486eb9cfa258907c472f69f
-Author: Jens-Heiner Rechtien <hr@openoffice.org>
-Date: Mon Mar 8 16:16:53 2004 +0000
-
- INTEGRATION: CWS i18n09 (1.2.2); FILE MERGED
- 2003/12/03 02:17:55 khong 1.2.2.1: #110105# Set word boundary between CJK and Latin script type
-
-commit a83ef0cbe99b66241615b238c1d287a6da04e51e
-Author: Jens-Heiner Rechtien <hr@openoffice.org>
-Date: Mon Mar 8 16:16:16 2004 +0000
-
- INTEGRATION: CWS i18n09 (1.2.2); FILE MERGED
- 2003/12/03 02:17:54 khong 1.2.2.1: #110105# Set word boundary between CJK and Latin script type
done, regression tests added:
+#i19716# fix wrong line break on bracket characters
#i21290# extend Greek script type
#i21907# fix isBeginWord and isEndWord problem
#i85411# Apply patch for ZWSP