From db8853d7a534941ac82b0bec753fa9509e5e3e0d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 27 Jul 2012 15:27:05 +0100 Subject: add regression test for #i19716# Change-Id: I11440667bdf73ed09ebc83771acf33e2d3e61f6c --- i18npool/qa/cppunit/test_breakiterator.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'i18npool/qa') 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 -- cgit