i18npool/qa/cppunit/test_breakiterator.cxx | 57 +++++++++++++++++++++++++++++ i18npool/source/breakiterator/data/README | 35 +---------------- icu/makefile.mk | 4 +- 3 files changed, 62 insertions(+), 34 deletions(-)
New commits: commit 89fcfe2ec21f26ce0d237e518d21b5c0e898246d Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 27 15:44:32 2012 +0100 disable building the icu samples Change-Id: I8e8fbb33bcb008d45f539a112b4bf210603286c9 diff --git a/icu/makefile.mk b/icu/makefile.mk index d1051ac..08fa3c6 100644 --- a/icu/makefile.mk +++ b/icu/makefile.mk @@ -149,7 +149,7 @@ icu_LDFLAGS+=-lgnustl_shared .ENDIF CONFIGURE_ACTION+=sh -c 'CPPFLAGS="$(EXTRA_CDEFS)" CFLAGS="$(icu_CFLAGS)" CXXFLAGS="$(icu_CXXFLAGS)" LDFLAGS="$(icu_LDFLAGS) $(LDFLAGSADD)" \ -./configure --enable-layout $(STATIC_OR_SHARED) $(BUILD_AND_HOST) $(DISABLE_64BIT) $(DISABLE_STRICT) $(DISABLE_DYLOAD) $(LIBRARY_SUFFIX)' +./configure --enable-layout --disable-samples $(STATIC_OR_SHARED) $(BUILD_AND_HOST) $(DISABLE_64BIT) $(DISABLE_STRICT) $(DISABLE_DYLOAD) $(LIBRARY_SUFFIX)' .IF "$(OS)" == "MACOSX" CONFIGURE_ACTION += \ @@ -229,7 +229,7 @@ BUILD_AND_HOST=--build=i586-pc-mingw32 --enable-64bit-libs=no .ENDIF CONFIGURE_ACTION+=sh -c 'CFLAGS="-O -D_MT" CXXFLAGS="-O -D_MT" LDFLAGS="$(icu_LDFLAGS)" LIBS="$(icu_LIBS)" \ -./configure $(BUILD_AND_HOST) --enable-layout --disable-static --enable-shared' +./configure $(BUILD_AND_HOST) --enable-layout --disable-static --enable-shared --disable-samples' CONFIGURE_FLAGS= commit db8853d7a534941ac82b0bec753fa9509e5e3e0d Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 27 15:27:05 2012 +0100 add regression test for #i19716# Change-Id: I11440667bdf73ed09ebc83771acf33e2d3e61f6c diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 23a4092..89b947f 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 6e26445..8967c73 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 <h...@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 <h...@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 commit 2cf7896039fa883901c0524ecbb71dca790bdb84 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 27 15:06:51 2012 +0100 add regression test for #i21290 Change-Id: Ic60f440f8dc8fcfa76a023557e76fcf8e3c52476 diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index b04dc53..23a4092 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -435,6 +435,47 @@ void TestBreakIterator::testWordBoundaries() while (nPos++ < aTest.getLength()); CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); } + + //https://issues.apache.org/ooo/show_bug.cgi?id=21290 + for (int j = 0; j < 2; ++j) + { + switch (j) + { + case 0: + aLocale.Language = rtl::OUString("en"); + aLocale.Country = rtl::OUString("US"); + break; + case 1: + aLocale.Language = rtl::OUString("grc"); + aLocale.Country = rtl::OUString(); + break; + default: + CPPUNIT_ASSERT(false); + break; + } + + const sal_Unicode TEST[] = + { + 0x1F0C, 0x03BD, 0x03B4, 0x03C1, 0x03B1, 0x0020, 0x1F00, + 0x03C1, 0x03BD, 0x1F7B, 0x03BC, 0x03B5, 0x03BD, 0x03BF, + 0x03C2, 0x0020, 0x1F00, 0x03BB, 0x03BB, 0x0020, 0x1F24, + 0x03C3, 0x03B8, 0x03B9, 0x03BF, 0x03BD + }; + rtl::OUString aTest(TEST, SAL_N_ELEMENTS(TEST)); + + sal_Int32 nPos = 0; + sal_Int32 aExpected[] = {5, 15, 19, 26}; + size_t i = 0; + do + { + CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aExpected)); + nPos = m_xBreak->getWordBoundary(aTest, nPos, aLocale, + i18n::WordType::DICTIONARY_WORD, true).endPos; + CPPUNIT_ASSERT(aExpected[i++] == nPos); + } + while (nPos++ < aTest.getLength()); + CPPUNIT_ASSERT(i == SAL_N_ELEMENTS(aExpected)); + } } //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 b058a2d..6e26445 100644 --- a/i18npool/source/breakiterator/data/README +++ b/i18npool/source/breakiterator/data/README @@ -602,25 +602,10 @@ 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 -commit f0939f43315a21f5134cd631773ddae7cfef4493 -Author: Jens-Heiner Rechtien <h...@openoffice.org> -Date: Mon Mar 8 16:16:04 2004 +0000 - - INTEGRATION: CWS i18n09 (1.12.2); FILE MERGED - 2003/12/09 19:35:48 khong 1.12.2.4: #112021# fix word boundary problem on begining and end of the string - 2003/12/08 23:47:26 khong 1.12.2.3: #i21907# fix isBeginWord and isEndWord problem - 2003/11/18 22:55:08 khong 1.12.2.2: #i21290# #i22530# #i14640# extend CTL script support, extend Greek script type - 2003/11/18 22:31:59 khong 1.12.2.1: #i21290# #i22530# #i14640# extend CTL script support, extend Greek script type - -commit 8311f89a42e6a4b8147191880470da415c9d7483 -Author: Rüdiger Timm <r...@openoffice.org> -Date: Tue Jan 20 12:20:28 2004 +0000 - - INTEGRATION: CWS i18n10 (1.12.4); FILE MERGED - 2003/12/17 20:15:43 khong 1.12.4.1: #i22138# #112506# migrate to ICU collator and remove link to tool library - done, regression tests added: +#i21290# extend Greek script type +#i21907# fix isBeginWord and isEndWord problem #i85411# Apply patch for ZWSP #i17155# fix line breakiterator rule to make slash and hyphen as part of word when doing line break #i13451# add '-' as midLetter for Catalan dictionary word breakiterator
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits