summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx13
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;