diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2015-12-28 20:03:24 -0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-12-29 13:48:56 +0000 |
commit | 79a1ba61e4753758f66ba25b128aeff96ea716c9 (patch) | |
tree | d9452b3e0e82722bc9bbd9741d97970464a9560c /starmath/qa/cppunit/test_starmath.cxx | |
parent | 78c6be9cf3c9c3c87d2f41981bdc61047171eafe (diff) |
tdf#32062: Add test
Change-Id: I0af72c436c2eca6741bfaa6e6570ce74f486c112
Reviewed-on: https://gerrit.libreoffice.org/20996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'starmath/qa/cppunit/test_starmath.cxx')
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index 27e64d7fb3e5..91a14bd91a9f 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -45,12 +45,14 @@ public: void editMarker(); void editFailure(); + void replacePlaceholder(); void viewZoom(); CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(editUndoRedo); CPPUNIT_TEST(editMarker); CPPUNIT_TEST(editFailure); + CPPUNIT_TEST(replacePlaceholder); CPPUNIT_TEST(viewZoom); CPPUNIT_TEST_SUITE_END(); @@ -221,6 +223,17 @@ void Test::editUndoRedo() } +void Test::replacePlaceholder() +{ + // Test the placeholder replacement. In this case, testing 'a + b', it + // should return '+a + b' when selecting '+<?>' in ElementsDock + m_pEditWindow->SetText("a + b"); + m_pEditWindow->SelectAll(); + m_pEditWindow->InsertText("+<?>"); + OUString sFinalText = m_pEditWindow->GetText(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be '+a + b'", OUString("+a + b"), sFinalText); +} + void Test::viewZoom() { sal_uInt16 nOrigZoom, nNextZoom, nFinalZoom; |