sw/qa/extras/uiwriter/data3/tdf132187.odt |binary sw/qa/extras/uiwriter/uiwriter3.cxx | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+)
New commits: commit 823a224843ee78a33f2d346c02344a88a77b2758 Author: Xisco Fauli <[email protected]> AuthorDate: Tue May 5 15:26:49 2020 +0200 Commit: Xisco Faulí <[email protected]> CommitDate: Tue May 5 17:53:30 2020 +0200 tdf#132187: sw: Add unittest Change-Id: I767f96fd8d373df9b8cbecd9cb75ed114166d0f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93485 Tested-by: Jenkins Reviewed-by: Xisco Faulí <[email protected]> diff --git a/sw/qa/extras/uiwriter/data3/tdf132187.odt b/sw/qa/extras/uiwriter/data3/tdf132187.odt new file mode 100644 index 000000000000..27bea84b6584 Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf132187.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 362a0161751d..4d7a43aed5b6 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -77,6 +77,31 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126626) CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xDraws->getCount()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132187) +{ + load(DATA_DIRECTORY, "tdf132187.odt"); + + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + + CPPUNIT_ASSERT_EQUAL(1, getPages()); + dispatchCommand(mxComponent, ".uno:SelectAll", {}); + dispatchCommand(mxComponent, ".uno:Copy", {}); + dispatchCommand(mxComponent, ".uno:GoToEndOfDoc", {}); + + for (sal_Int32 i = 0; i < 10; ++i) + { + dispatchCommand(mxComponent, ".uno:Paste", {}); + Scheduler::ProcessEventsToIdle(); + } + + //without the fix in place, this test would fail with: + //- Expected: 1 + //- Actual : 70 + + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128739) { load(DATA_DIRECTORY, "tdf128739.docx"); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
