[Libreoffice-commits] core.git: sw/CppunitTest_sw_uiwriter.mk sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 27 12:02:18 UTC 2020
sw/CppunitTest_sw_uiwriter.mk | 1
sw/qa/extras/uiwriter/data3/tdf129382.docx |binary
sw/qa/extras/uiwriter/uiwriter3.cxx | 36 +++++++++++++++++++++++++++++
3 files changed, 37 insertions(+)
New commits:
commit fe01d8561339420bdbf8d98a8fd2b0fca78b6707
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Feb 27 11:41:24 2020 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 27 13:01:43 2020 +0100
tdf#129382: Add unittest
Change-Id: If22d82d506c365ae956de3d15e64c7065ad6b585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89625
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index 342d8e3d4517..85ea9337c1d4 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_uiwriter))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_uiwriter, \
sw/qa/extras/uiwriter/uiwriter \
sw/qa/extras/uiwriter/uiwriter2 \
+ sw/qa/extras/uiwriter/uiwriter3 \
))
# note: this links msword only for the reason to have an order dependency,
diff --git a/sw/qa/extras/uiwriter/data3/tdf129382.docx b/sw/qa/extras/uiwriter/data3/tdf129382.docx
new file mode 100644
index 000000000000..19da7ef530b7
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf129382.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
new file mode 100644
index 000000000000..1d6e351b614a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+namespace
+{
+char const DATA_DIRECTORY[] = "/sw/qa/extras/uiwriter/data3/";
+} // namespace
+
+/// Third set of tests asserting the behavior of Writer user interface shells.
+class SwUiWriterTest3 : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382)
+{
+ load(DATA_DIRECTORY, "tdf129382.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list