[Libreoffice-commits] core.git: sw/qa
Mark Hung
marklh9 at gmail.com
Wed Jan 17 08:48:19 UTC 2018
sw/qa/extras/uiwriter/uiwriter.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit a4895d64298e40e7c00a5b6f7a7455519f408ec1
Author: Mark Hung <marklh9 at gmail.com>
Date: Mon Jan 15 21:34:50 2018 +0800
Fix testTdf113481 in case detected script is not as expected.
Change-Id: Iefc85ab40831e4e2576ce1b3ac513858cf18185b
Reviewed-on: https://gerrit.libreoffice.org/47898
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mark Hung <marklh9 at gmail.com>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e76a50ab8cc3..43b492763f04 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -5741,10 +5741,13 @@ void SwUiWriterTest::testTdf113481()
pWrtShell->Down(false);
pWrtShell->EndPara();
// Before: U+4E2D U+2205 U+FE00. After: U+4E2D U+2205
- pWrtShell->DelLeft();
- const uno::Reference< text::XTextRange > xPara2 = getParagraph(2);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength());
- CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]);
+ if ( pWrtShell->GetScriptType() == SvtScriptType::ASIAN )
+ {
+ pWrtShell->DelLeft();
+ const uno::Reference< text::XTextRange > xPara2 = getParagraph(2);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength());
+ CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]);
+ }
// Characters of other scripts, remove one character.
pWrtShell->Down(false);
More information about the Libreoffice-commits
mailing list