summaryrefslogtreecommitdiff
path: root/i18npool/qa/cppunit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-22 12:59:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-22 13:20:07 +0100
commit5e46e382694587e88ecdebc7fa57e90fbaca7a76 (patch)
tree7dad250b4da25d5ba9be8190589d0e9edd47fa52 /i18npool/qa/cppunit
parentd8bcfcf1b6e909b27f55e252b66f6e46b19ff6ab (diff)
crashtesting: fix tdf92993-1.docx failure
Change-Id: I76f09a09fd6c3b114ba74737d4a1ba5dad0fd28f
Diffstat (limited to 'i18npool/qa/cppunit')
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 29fc48909d12..1c8b1f9a7ac5 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -142,6 +142,22 @@ void TestBreakIterator::testLineBreaking()
CPPUNIT_ASSERT_MESSAGE("Expected a break at the start of the line, not at ]", aResult.breakIndex == 0);
}
}
+
+ //this is an example sequence from tdf92993-1.docx caught by the load crashtesting
+ {
+ const sal_Unicode WEIRD1[] = { 0xd83c, 0xdf56, 0xd83c, 0xdf57, 0xd83c, 0xdf46,
+ 0xd83c, 0xdf64, 0x2668, 0xfe0f, 0xd83c, 0xdfc6};
+
+ OUString aTest(WEIRD1, SAL_N_ELEMENTS(WEIRD1));
+
+ aLocale.Language = "en";
+ aLocale.Country = "US";
+
+ {
+ //This must not assert/crash
+ (void)m_xBreak->getLineBreak(aTest, 0, aLocale, 0, aHyphOptions, aUserOptions);
+ }
+ }
}
//See https://bugs.libreoffice.org/show_bug.cgi?id=49629