summaryrefslogtreecommitdiff
path: root/i18npool/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-24 22:32:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-25 10:02:15 +0100
commit5a6279df5549665ffe378c7c313399aa47823085 (patch)
treed884c853f1ab3e197a284dc6502a9ae6563200e0 /i18npool/qa
parentb8fa8841c098f15ef2280aa4c82c55c4f96325c9 (diff)
Related: #i17155# regression test for slash part of word for line break
Change-Id: I5b457531fb94f66dd7f5fdcc4636c5a202a036f1
Diffstat (limited to 'i18npool/qa')
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index cf2147f8678c..403c71bdbf3a 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -125,6 +125,21 @@ void TestBreakIterator::testLineBreaking()
CPPUNIT_ASSERT_MESSAGE("Expected a break at the the start of the word", aResult.breakIndex == aWord.getLength()+1);
}
}
+
+ //See https://issues.apache.org/ooo/show_bug.cgi?id=17155
+ {
+ rtl::OUString aTest(RTL_CONSTASCII_USTRINGPARAM("foo /bar/baz"));
+
+ aLocale.Language = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
+ aLocale.Country = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
+
+ {
+ //Here we want the line break to leave /bar/ba clumped together on the next line
+ i18n::LineBreakResults aResult = m_xBreak->getLineBreak(aTest, strlen("foo /bar/ba"), aLocale, 0,
+ aHyphOptions, aUserOptions);
+ CPPUNIT_ASSERT_MESSAGE("Expected a break at the first slash", aResult.breakIndex == 4);
+ }
+ }
}
//See https://bugs.freedesktop.org/show_bug.cgi?id=49629