summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/qa/extras/data/ns-prefix-math.mml13
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx11
2 files changed, 24 insertions, 0 deletions
diff --git a/starmath/qa/extras/data/ns-prefix-math.mml b/starmath/qa/extras/data/ns-prefix-math.mml
new file mode 100644
index 000000000000..c4c961223b66
--- /dev/null
+++ b/starmath/qa/extras/data/ns-prefix-math.mml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<math:math xmlns:math="http://www.w3.org/1998/Math/MathML">
+ <math:msup>
+ <math:mfenced>
+ <math:mrow>
+ <math:mi>a</math:mi>
+ <math:mo>+</math:mo>
+ <math:mi>b</math:mi>
+ </math:mrow>
+ </math:mfenced>
+ <math:mn>2</math:mn>
+ </math:msup>
+</math:math>
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index 3cfce68eb9aa..e52ebf308daa 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -30,10 +30,12 @@ public:
virtual void tearDown() SAL_OVERRIDE;
void testSimple();
+ void testNsPrefixMath();
void testMaction();
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testSimple);
+ CPPUNIT_TEST(testNsPrefixMath);
CPPUNIT_TEST(testMaction);
CPPUNIT_TEST_SUITE_END();
@@ -83,6 +85,15 @@ void Test::tearDown()
void Test::testSimple()
{
loadURL(getURLFromSrc("starmath/qa/extras/data/simple.mml"));
+ OUString sExpected("left ( {italic \"a\" + italic \"b\"} right )^italic \"2\"");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText());
+}
+
+void Test::testNsPrefixMath()
+{
+ loadURL(getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml"));
+ OUString sExpected("left ( {italic \"a\" + italic \"b\"} right )^italic \"2\"");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText());
}
void Test::testMaction()