Kaydet (Commit) 9aca5ac2 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

starmath: add test for detecting MathML's namespace prefix 'math:'

Change-Id: Ib1b3ec5fc25a05da4970c49a18647299d3d8ce01
Reviewed-on: https://gerrit.libreoffice.org/15013Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e86f4d3a
<?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>
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment