diff --git a/tests/HTMLPurifier/HTMLModule/MathBasicTest.php b/tests/HTMLPurifier/HTMLModule/MathBasicTest.php
new file mode 100644
index 00000000..4c9daa4c
--- /dev/null
+++ b/tests/HTMLPurifier/HTMLModule/MathBasicTest.php
@@ -0,0 +1,98 @@
+ ErrorHandling folder
+ */
+class HTMLPurifier_HTMLModule_MathBasicTest extends HTMLPurifier_HTMLModuleHarness
+{
+
+ public function setup() {
+
+ parent::setup();
+ $this->config->set('HTML.Math', true);
+
+ // We load each snippet and its purified version each into a
+ // separate XML document. This normalizes some self-closing
+ // tags which can be either or or into a
+ // common format to compare the strings properly.
+ $this->pre = new DOMDocument();
+ $this->post = new DOMDocument();
+
+ }
+
+ // Correctly formed MathML trees
+ public function testGood()
+ {
+
+ foreach (glob('MathML/basic/good/*.mml') as $filename) {
+
+ $snippet = file_get_contents($filename);
+
+ $this->pre->loadXML($snippet);
+ $this->pre->normalizeDocument();
+
+ $this->post->loadXML($this->purifier->purify($snippet, $this->config));
+ $this->post->normalizeDocument();
+
+ $this->assertIdentical($this->pre->saveXML(), $this->post->saveXML());
+
+ }
+
+ }
+
+ // Incorrectly formed MathML trees
+ public function testBad() {
+
+ foreach (glob('MathML/basic/bad/*.mml') as $filename) {
+
+ $snippet = file_get_contents($filename);
+
+ $this->pre->loadXML($snippet);
+ $this->pre->normalizeDocument();
+
+ $this->post->loadXML($this->purifier->purify($snippet, $this->config));
+ $this->post->normalizeDocument();
+
+ $this->assertFalse($this->pre->saveXML() == $this->post->saveXML());
+
+ }
+
+ }
+
+ // Incorrectly formed MathML trees that yield an error
+ public function testError() {
+
+ $snippet = '' .
+'';
+
+ $this->expectError();
+
+ $this->pre->loadXML($snippet);
+ $this->pre->normalizeDocument();
+
+ $this->post->loadXML($this->purifier->purify($snippet, $this->config));
+ $this->post->normalizeDocument();
+
+ $this->assertFalse($this->pre->saveXML() == $this->post->saveXML());
+
+ }
+
+
+
+}
+
+// vim: et sw=4 sts=4
diff --git a/tests/MathML/basic/bad/badAttribs2.mml b/tests/MathML/basic/bad/badAttribs2.mml
new file mode 100644
index 00000000..e36651ce
--- /dev/null
+++ b/tests/MathML/basic/bad/badAttribs2.mml
@@ -0,0 +1,10 @@
+
+
+
+
+ 2
+ 5
+
+ +
+ x
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badBvar1.mml b/tests/MathML/basic/bad/badBvar1.mml
new file mode 100644
index 00000000..5578d737
--- /dev/null
+++ b/tests/MathML/basic/bad/badBvar1.mml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+ correct:
+
+
+
+ x
+
+
+
+
+
+ correct w/ degree
+
+
+
+ x
+
+ 2
+
+
+
+
+
+
+ missing <ci>:
+
+
+
+
+
+
+
+ missing <ci> w/ degree:
+
+
+
+
+ 2
+
+
+
+
+
+
+ 2 <ci>s
+
+
+
+ x
+ y
+
+
+
+
+
+ 2 w/ degree
+
+
+
+ x
+ y
+
+ 2
+
+
+
+
+
+
+ <mi/>used
+
+
+
+ x
+
+
+
+
+
+ <mi/>used w/ degree
+
+
+
+ x
+
+ 2
+
+
+
+
+
+
+ missing <ci>, 2 degrees
+
+
+
+
+ 4
+
+
+ 2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badCondContent1.mml b/tests/MathML/basic/bad/badCondContent1.mml
new file mode 100644
index 00000000..0beef936
--- /dev/null
+++ b/tests/MathML/basic/bad/badCondContent1.mml
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+ x
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+ 2
+ x
+ y
+
+
+
+
+
+
+
+ 2
+ x
+ y
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ 2
+ 5
+
+
+
+
+
+
+
+
+
+
+ 2
+ 5
+
+
+
+ 2
+
+ 5
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badMoment1.mml b/tests/MathML/basic/bad/badMoment1.mml
new file mode 100644
index 00000000..e0cb1a05
--- /dev/null
+++ b/tests/MathML/basic/bad/badMoment1.mml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+ 3
+
+
+ 0
+
+
+ 4
+
+ X
+
+
+
+
+
+ 3
+
+ x
+
+ 0
+
+ X
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badPiecewise1.mml b/tests/MathML/basic/bad/badPiecewise1.mml
new file mode 100644
index 00000000..20cc6c04
--- /dev/null
+++ b/tests/MathML/basic/bad/badPiecewise1.mml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ 0
+
+
+ x
+ 5
+
+
+
+ x
+
+
+ y
+
+
+ x
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badTag1.mml b/tests/MathML/basic/bad/badTag1.mml
new file mode 100644
index 00000000..14e75961
--- /dev/null
+++ b/tests/MathML/basic/bad/badTag1.mml
@@ -0,0 +1,21 @@
+
+
+
+
+ 5
+ 2
+
+ +
+
+ 2
+ 5
+
+ +
+
+ 5
+ +
+ 5
+
+ +
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/badTagPhantom2.mml b/tests/MathML/basic/bad/badTagPhantom2.mml
new file mode 100644
index 00000000..9535a127
--- /dev/null
+++ b/tests/MathML/basic/bad/badTagPhantom2.mml
@@ -0,0 +1,9 @@
+
+
+
+ 2
+ +
+
+ 14
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/deprecated-mtd1.mml b/tests/MathML/basic/bad/deprecated-mtd1.mml
new file mode 100644
index 00000000..84fe3536
--- /dev/null
+++ b/tests/MathML/basic/bad/deprecated-mtd1.mml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/deprecated-mtd2.mml b/tests/MathML/basic/bad/deprecated-mtd2.mml
new file mode 100644
index 00000000..90600f2a
--- /dev/null
+++ b/tests/MathML/basic/bad/deprecated-mtd2.mml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/deprecated-test3.mml b/tests/MathML/basic/bad/deprecated-test3.mml
new file mode 100644
index 00000000..63da8b05
--- /dev/null
+++ b/tests/MathML/basic/bad/deprecated-test3.mml
@@ -0,0 +1,18 @@
+
+
+
+
+ 2
+
+ 5
+
+
+
+
+
+ 4
+ +
+ 3
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/emptyContent.mml b/tests/MathML/basic/bad/emptyContent.mml
new file mode 100644
index 00000000..3af41be7
--- /dev/null
+++ b/tests/MathML/basic/bad/emptyContent.mml
@@ -0,0 +1,1046 @@
+
+
+
+
+
+
+ inverse
+
+
+
+
+
+
+
+
+
+ lt
+
+
+
+
+
+
+
+
+
+ compose
+
+
+
+
+
+
+
+
+
+ domain
+
+
+
+
+
+
+
+
+
+ codomain
+
+
+
+
+
+
+
+
+
+ image
+
+
+
+
+
+
+
+
+
+ quotient
+
+
+
+
+
+
+
+
+
+ factorial
+
+
+
+
+
+
+
+
+
+ divide
+
+
+
+
+
+
+
+
+
+ max
+
+
+
+
+
+
+
+
+
+ min
+
+
+
+
+
+
+
+
+
+ minus
+
+
+
+
+
+
+
+
+
+ plus
+
+
+
+
+
+
+
+
+
+ power
+
+
+
+
+
+
+
+
+
+ rem
+
+
+
+
+
+
+
+
+
+ times
+
+
+
+
+
+
+
+
+
+ root
+
+
+
+
+
+
+
+
+
+ gcd
+
+
+
+
+
+
+
+
+
+ and
+
+
+
+
+
+
+
+
+
+ or
+
+
+
+
+
+
+
+
+
+ not
+
+
+
+
+
+
+
+
+
+ xor
+
+
+
+
+
+
+
+
+
+ implies
+
+
+
+
+
+
+
+
+
+ forall
+
+
+
+
+
+
+
+
+
+ exists
+
+
+
+
+
+
+
+
+
+ abs
+
+
+
+
+
+
+
+
+
+ conjugate
+
+
+
+
+
+
+
+
+
+ arg
+
+
+
+
+
+
+
+
+
+ real
+
+
+
+
+
+
+
+
+
+ imaginary
+
+
+
+
+
+
+
+
+
+ lcm
+
+
+
+
+
+
+
+
+
+ floor
+
+
+
+
+
+
+
+
+
+ ceiling
+
+
+
+
+
+
+
+
+
+ eq
+
+
+
+
+
+
+
+
+
+ neq
+
+
+
+
+
+
+
+
+
+ gt
+
+
+
+
+
+
+
+
+
+ lt
+
+
+
+
+
+
+
+
+
+ geq
+
+
+
+
+
+
+
+
+
+ leq
+
+
+
+
+
+
+
+
+
+ equivalent
+
+
+
+
+
+
+
+
+
+ approx
+
+
+
+
+
+
+
+
+
+ factorof
+
+
+
+
+
+
+
+
+
+ int
+
+
+
+
+
+
+
+
+
+ diff
+
+
+
+
+
+
+
+
+
+ partialdiff
+
+
+
+
+
+
+
+
+
+ divergence
+
+
+
+
+
+
+
+
+
+ grad
+
+
+
+
+
+
+
+
+
+ curl
+
+
+
+
+
+
+
+
+
+ laplacian
+
+
+
+
+
+
+
+
+
+ union
+
+
+
+
+
+
+
+
+
+ intersect
+
+
+
+
+
+
+
+
+
+ in
+
+
+
+
+
+
+
+
+
+ notin
+
+
+
+
+
+
+
+
+
+ subset
+
+
+
+
+
+
+
+
+
+ prsubset
+
+
+
+
+
+
+
+
+
+ notsubset
+
+
+
+
+
+
+
+
+
+ notprsubset
+
+
+
+
+
+
+
+
+
+ setdiff
+
+
+
+
+
+
+
+
+
+ card
+
+
+
+
+
+
+
+
+
+ cartesianproduct
+
+
+
+
+
+
+
+
+
+ sum
+
+
+
+
+
+
+
+
+
+ product
+
+
+
+
+
+
+
+
+
+ limit
+
+
+
+
+
+
+
+
+
+ tendsto
+
+
+
+
+
+
+
+
+
+ exp
+
+
+
+
+
+
+
+
+
+ ln
+
+
+
+
+
+
+
+
+
+ log
+
+
+
+
+
+
+
+
+
+ sin
+
+
+
+
+
+
+
+
+
+ cos
+
+
+
+
+
+
+
+
+
+ tan
+
+
+
+
+
+
+
+
+
+ sec
+
+
+
+
+
+
+
+
+
+ csc
+
+
+
+
+
+
+
+
+
+ cot
+
+
+
+
+
+
+
+
+
+ sinh
+
+
+
+
+
+
+
+
+
+ cosh
+
+
+
+
+
+
+
+
+
+ tanh
+
+
+
+
+
+
+
+
+
+ sech
+
+
+
+
+
+
+
+
+
+ csch
+
+
+
+
+
+
+
+
+
+ coth
+
+
+
+
+
+
+
+
+
+ arcsin
+
+
+
+
+
+
+
+
+
+ arccos
+
+
+
+
+
+
+
+
+
+ arctan
+
+
+
+
+
+
+
+
+
+ arcsec
+
+
+
+
+
+
+
+
+
+ arccsc
+
+
+
+
+
+
+
+
+
+ arccot
+
+
+
+
+
+
+
+
+
+ arcsinh
+
+
+
+
+
+
+
+
+
+ arccosh
+
+
+
+
+
+
+
+
+
+ arctanh
+
+
+
+
+
+
+
+
+
+ arcsech
+
+
+
+
+
+
+
+
+
+ arccsch
+
+
+
+
+
+
+
+
+
+ arccoth
+
+
+
+
+
+
+
+
+
+ mean
+
+
+
+
+
+
+
+
+
+ sdev
+
+
+
+
+
+
+
+
+
+ variance
+
+
+
+
+
+
+
+
+
+ median
+
+
+
+
+
+
+
+
+
+ mode
+
+
+
+
+
+
+
+
+
+ moment
+
+
+
+
+
+
+
+
+
+ momentabout
+
+
+
+
+
+
+
+
+
+ determinant
+
+
+
+
+
+
+
+
+
+ transpose
+
+
+
+
+
+
+
+
+
+ selector
+
+
+
+
+
+
+
+
+
+ vectorproduct
+
+
+
+
+
+
+
+
+
+ scalarproduct
+
+
+
+
+
+
+
+
+
+ outerproduct
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/mrootE2.mml b/tests/MathML/basic/bad/mrootE2.mml
new file mode 100644
index 00000000..bd1f3c35
--- /dev/null
+++ b/tests/MathML/basic/bad/mrootE2.mml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ 3
+ x
+ 2
+
+
+ 3
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/mtable1.mml b/tests/MathML/basic/bad/mtable1.mml
new file mode 100644
index 00000000..6d7b8607
--- /dev/null
+++ b/tests/MathML/basic/bad/mtable1.mml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ 1111.23
+ 0
+ 0
+
+
+ 0
+ 1123
+ 0
+
+
+ 0.2
+ 0
+ 1123
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/noChildContent.mml b/tests/MathML/basic/bad/noChildContent.mml
new file mode 100644
index 00000000..3991e626
--- /dev/null
+++ b/tests/MathML/basic/bad/noChildContent.mml
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+ apply
+
+
+
+
+
+
+
+ reln
+
+
+
+
+
+
+
+ fn
+
+
+
+
+
+
+
+ interval
+
+
+
+
+
+
+
+ condition
+
+
+
+
+
+
+
+ declare
+
+
+
+
+
+
+
+ lambda
+
+
+
+
+
+
+
+ domainofapp
+
+
+
+
+
+
+
+ piecewise
+
+
+
+
+
+
+
+ piece
+
+
+
+
+
+
+
+ otherwise
+
+
+
+
+
+
+
+ lowlimit
+
+
+
+
+
+
+
+ uplimit
+
+
+
+
+
+
+
+ bvar
+
+
+
+
+
+
+
+ degree
+
+
+
+
+
+
+
+ set
+
+
+
+
+
+
+
+ list
+
+
+
+
+
+
+
+ moment
+
+
+
+
+
+
+
+ momentabout
+
+
+
+
+
+
+
+ vector
+
+
+
+
+
+
+
+ matrix
+
+
+
+
+
+
+
+ matrixrow
+
+
+
+
+
+
+
+
+
+ semantics
+
+
+
+
+
+
+
+ annotation
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/noChildPresentation.mml b/tests/MathML/basic/bad/noChildPresentation.mml
new file mode 100644
index 00000000..3f6dffb2
--- /dev/null
+++ b/tests/MathML/basic/bad/noChildPresentation.mml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+ mrow
+
+
+
+
+
+
+
+ frac
+
+
+
+
+
+
+
+ sqrt
+
+
+
+
+
+
+
+ root
+
+
+
+
+
+
+
+ style
+
+
+
+
+
+
+
+ error
+
+
+
+
+
+
+
+ padded
+
+
+
+
+
+
+
+ phantom
+
+
+
+
+
+
+
+ fenced
+
+
+
+
+
+
+
+ enclose
+
+
+
+
+
+
+
+ sub
+
+
+
+
+
+
+
+ sup
+
+
+
+
+
+
+
+ subsup
+
+
+
+
+
+
+
+ under
+
+
+
+
+
+
+
+ over
+
+
+
+
+
+
+
+ underover
+
+
+
+
+
+
+
+ multiscripts
+
+
+
+
+
+
+
+ table
+
+
+
+
+
+
+
+ table row
+
+
+
+
+
+
+
+
+
+ table cell
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/bad/tooFewContentContainer.mml b/tests/MathML/basic/bad/tooFewContentContainer.mml
new file mode 100644
index 00000000..3aeaf0b6
--- /dev/null
+++ b/tests/MathML/basic/bad/tooFewContentContainer.mml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ reln
+
+
+
+
+
+ ,
+
+
+ a
+
+
+
+
+
+ interval
+
+
+
+ 2
+
+
+
+
+
+ lambda
+
+
+
+
+ x
+
+
+ ,
+
+
+ x
+
+
+
+
+
+
+ bvar
+
+
+
+
+ 2
+
+
+
+
+
+
+ set
+
+
+
+
+
+
+ x
+ 5
+
+
+
+
+
+
+
+ list
+
+
+
+
+
+
+ x
+ 5
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/1.mml b/tests/MathML/basic/good/1.mml
new file mode 100644
index 00000000..8c7199ad
--- /dev/null
+++ b/tests/MathML/basic/good/1.mml
@@ -0,0 +1,12 @@
+
+
+
+ x
+ 2
+
+
+ y
+ 2
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/10.mml b/tests/MathML/basic/good/10.mml
new file mode 100644
index 00000000..d12e90f0
--- /dev/null
+++ b/tests/MathML/basic/good/10.mml
@@ -0,0 +1,31 @@
+
+
+
+ ∑
+
+
+
+ 0
+ ≤
+ i
+ ≤
+ m
+
+
+ 0
+ <
+ j
+ <
+ n
+
+
+
+
+ P
+ (
+ i
+ ,
+ j
+ )
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/11.mml b/tests/MathML/basic/good/11.mml
new file mode 100644
index 00000000..ac832a2f
--- /dev/null
+++ b/tests/MathML/basic/good/11.mml
@@ -0,0 +1,11 @@
+
+
+
+ x
+
+ 2
+ y
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/12.mml b/tests/MathML/basic/good/12.mml
new file mode 100644
index 00000000..6801058e
--- /dev/null
+++ b/tests/MathML/basic/good/12.mml
@@ -0,0 +1,52 @@
+
+
+
+ ∑
+
+ i
+ =
+ 1
+
+ p
+
+
+ ∑
+
+ j
+ =
+ 1
+
+ q
+
+
+ ∑
+
+ k
+ =
+ 1
+
+ r
+
+
+ a
+
+ i
+ j
+
+
+
+ b
+
+ j
+ k
+
+
+
+ c
+
+ k
+ i
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/13.mml b/tests/MathML/basic/good/13.mml
new file mode 100644
index 00000000..02c6e6ff
--- /dev/null
+++ b/tests/MathML/basic/good/13.mml
@@ -0,0 +1,33 @@
+
+
+
+ 1
+ +
+
+ 1
+ +
+
+ 1
+ +
+
+ 1
+ +
+
+ 1
+ +
+
+ 1
+ +
+
+ 1
+ +
+ x
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/14.mml b/tests/MathML/basic/good/14.mml
new file mode 100644
index 00000000..b4eca430
--- /dev/null
+++ b/tests/MathML/basic/good/14.mml
@@ -0,0 +1,51 @@
+
+
+
+ (
+
+
+ ∂
+ 2
+
+
+ ∂
+
+ x
+ 2
+
+
+
+ +
+
+
+ ∂
+ 2
+
+
+ ∂
+
+ y
+ 2
+
+
+
+ )
+
+
+
+ |
+ φ
+ (
+ x
+ +
+ i
+ y
+ )
+ |
+
+ 2
+
+ =
+ 0
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/15.mml b/tests/MathML/basic/good/15.mml
new file mode 100644
index 00000000..751c0896
--- /dev/null
+++ b/tests/MathML/basic/good/15.mml
@@ -0,0 +1,14 @@
+
+
+
+ 2
+
+ 2
+
+ 2
+ x
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/16.mml b/tests/MathML/basic/good/16.mml
new file mode 100644
index 00000000..03a1d712
--- /dev/null
+++ b/tests/MathML/basic/good/16.mml
@@ -0,0 +1,13 @@
+
+
+
+ ∫
+ 1
+ x
+
+
+ dt
+ t
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/17.mml b/tests/MathML/basic/good/17.mml
new file mode 100644
index 00000000..0ce58b9d
--- /dev/null
+++ b/tests/MathML/basic/good/17.mml
@@ -0,0 +1,11 @@
+
+
+
+ ∬
+ D
+
+ dx
+
+ dy
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/18.mml b/tests/MathML/basic/good/18.mml
new file mode 100644
index 00000000..e8c56681
--- /dev/null
+++ b/tests/MathML/basic/good/18.mml
@@ -0,0 +1,62 @@
+
+
+ f
+ (
+ x
+ )
+ =
+
+ {
+
+
+
+
+ 1
+ /
+ 3
+
+
+
+
+ if
+ 0
+ ≤
+ x
+ ≤
+ 1
+ ;
+
+
+
+
+
+
+ 2
+ /
+ 3
+
+
+
+
+ if
+ 3
+ ≤
+ x
+ ≤
+ 4
+ ;
+
+
+
+
+
+ 0
+
+
+ elsewhere.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/19.mml b/tests/MathML/basic/good/19.mml
new file mode 100644
index 00000000..660017e7
--- /dev/null
+++ b/tests/MathML/basic/good/19.mml
@@ -0,0 +1,15 @@
+
+
+
+ x
+ +
+ ...
+ +
+ x
+
+
+ ⏞
+ k times
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/2.mml b/tests/MathML/basic/good/2.mml
new file mode 100644
index 00000000..25102c42
--- /dev/null
+++ b/tests/MathML/basic/good/2.mml
@@ -0,0 +1,10 @@
+
+
+
+ F
+ 3
+
+ 2
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/20.mml b/tests/MathML/basic/good/20.mml
new file mode 100644
index 00000000..99646908
--- /dev/null
+++ b/tests/MathML/basic/good/20.mml
@@ -0,0 +1,11 @@
+
+
+
+ y
+
+ x
+ 2
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/21.mml b/tests/MathML/basic/good/21.mml
new file mode 100644
index 00000000..a822b702
--- /dev/null
+++ b/tests/MathML/basic/good/21.mml
@@ -0,0 +1,34 @@
+
+
+
+ ∑
+
+ p
+ prime
+
+
+ f
+ (
+ p
+ )
+ =
+
+ ∫
+
+ t
+ >
+ 1
+
+
+ f
+ (
+ t
+ )
+
+ d
+ π
+ (
+ t
+ )
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/22.mml b/tests/MathML/basic/good/22.mml
new file mode 100644
index 00000000..24ea8e95
--- /dev/null
+++ b/tests/MathML/basic/good/22.mml
@@ -0,0 +1,58 @@
+
+
+ {
+
+
+
+
+ (
+ a
+ ,
+ ...
+ ,
+ a
+
+
+ ⏞
+
+ k
+
+ a
+ \'s
+
+
+
+ ,
+
+
+ (
+ b
+ ,
+ ...
+ ,
+ b
+
+
+ ⏞
+
+ ℓ
+
+ b
+ \'s
+
+
+
+
+
+ ⏟
+
+ k
+ +
+ ℓ
+ elements
+
+
+
+ }
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/23.mml b/tests/MathML/basic/good/23.mml
new file mode 100644
index 00000000..b2bbfb54
--- /dev/null
+++ b/tests/MathML/basic/good/23.mml
@@ -0,0 +1,87 @@
+
+
+ (
+
+
+
+
+ (
+
+
+
+ a
+
+
+ b
+
+
+
+
+ c
+
+
+ d
+
+
+
+ )
+
+
+
+
+ (
+
+
+
+ e
+
+
+ f
+
+
+
+
+ g
+
+
+ h
+
+
+
+ )
+
+
+
+
+
+ 0
+
+
+
+ (
+
+
+
+ i
+
+
+ j
+
+
+
+
+ k
+
+
+ l
+
+
+
+ )
+
+
+
+
+ )
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/24.mml b/tests/MathML/basic/good/24.mml
new file mode 100644
index 00000000..8f68ac37
--- /dev/null
+++ b/tests/MathML/basic/good/24.mml
@@ -0,0 +1,162 @@
+
+
+ det
+ |
+
+
+
+
+ c
+ 0
+
+
+
+
+ c
+ 1
+
+
+
+
+ c
+ 2
+
+
+
+ …
+
+
+
+ c
+ n
+
+
+
+
+
+
+ c
+ 1
+
+
+
+
+ c
+ 2
+
+
+
+
+ c
+ 3
+
+
+
+ …
+
+
+
+ c
+
+ n
+ +
+ 1
+
+
+
+
+
+
+
+ c
+ 2
+
+
+
+
+ c
+ 3
+
+
+
+
+ c
+ 4
+
+
+
+ …
+
+
+
+ c
+
+ n
+ +
+ 2
+
+
+
+
+
+
+ ⋮
+
+
+ ⋮
+
+
+ ⋮
+
+
+
+
+ ⋮
+
+
+
+
+
+ c
+ n
+
+
+
+
+ c
+
+ n
+ +
+ 1
+
+
+
+
+
+ c
+
+ n
+ +
+ 2
+
+
+
+
+ …
+
+
+
+ c
+
+ 2
+ n
+
+
+
+
+
+ |
+ >
+ 0
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/25.mml b/tests/MathML/basic/good/25.mml
new file mode 100644
index 00000000..54af3311
--- /dev/null
+++ b/tests/MathML/basic/good/25.mml
@@ -0,0 +1,9 @@
+
+
+ y
+
+ x
+ 2
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/26.mml b/tests/MathML/basic/good/26.mml
new file mode 100644
index 00000000..490c384b
--- /dev/null
+++ b/tests/MathML/basic/good/26.mml
@@ -0,0 +1,11 @@
+
+
+
+ x
+ 92
+ 31415
+
+ +
+ π
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/27.mml b/tests/MathML/basic/good/27.mml
new file mode 100644
index 00000000..71ff0843
--- /dev/null
+++ b/tests/MathML/basic/good/27.mml
@@ -0,0 +1,15 @@
+
+
+ x
+
+ y
+ b
+ a
+
+
+ z
+ c
+ d
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/28.mml b/tests/MathML/basic/good/28.mml
new file mode 100644
index 00000000..7c643cc7
--- /dev/null
+++ b/tests/MathML/basic/good/28.mml
@@ -0,0 +1,7 @@
+
+
+ y
+ 3
+ ‴
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/29.mml b/tests/MathML/basic/good/29.mml
new file mode 100644
index 00000000..117ca8ce
--- /dev/null
+++ b/tests/MathML/basic/good/29.mml
@@ -0,0 +1 @@
+limn→+∞2πnn!(ne)n=1
\ No newline at end of file
diff --git a/tests/MathML/basic/good/3.mml b/tests/MathML/basic/good/3.mml
new file mode 100644
index 00000000..4203cc5b
--- /dev/null
+++ b/tests/MathML/basic/good/3.mml
@@ -0,0 +1,19 @@
+
+
+
+
+ x
+ +
+
+ y
+ 2
+
+
+
+ k
+ +
+ 1
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/30.mml b/tests/MathML/basic/good/30.mml
new file mode 100644
index 00000000..6d98a437
--- /dev/null
+++ b/tests/MathML/basic/good/30.mml
@@ -0,0 +1 @@
+det(A)=∑σ∊Snϵ(σ)∏i=1nai,σi
\ No newline at end of file
diff --git a/tests/MathML/basic/good/4.mml b/tests/MathML/basic/good/4.mml
new file mode 100644
index 00000000..7abbff22
--- /dev/null
+++ b/tests/MathML/basic/good/4.mml
@@ -0,0 +1,17 @@
+
+
+ x
+ +
+
+ y
+
+ 2
+
+ k
+ +
+ 1
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/5.mml b/tests/MathML/basic/good/5.mml
new file mode 100644
index 00000000..bc57720f
--- /dev/null
+++ b/tests/MathML/basic/good/5.mml
@@ -0,0 +1,12 @@
+
+
+
+ a
+
+ b
+ /
+ 2
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/6.mml b/tests/MathML/basic/good/6.mml
new file mode 100644
index 00000000..238507d7
--- /dev/null
+++ b/tests/MathML/basic/good/6.mml
@@ -0,0 +1,48 @@
+
+
+
+ a
+ 0
+
+ +
+
+ 1
+
+
+ a
+ 1
+
+ +
+
+ 1
+
+
+ a
+ 2
+
+ +
+
+ 1
+
+
+ a
+ 3
+
+ +
+
+ 1
+
+
+ a
+ 4
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/7.mml b/tests/MathML/basic/good/7.mml
new file mode 100644
index 00000000..08d7cb31
--- /dev/null
+++ b/tests/MathML/basic/good/7.mml
@@ -0,0 +1,48 @@
+
+
+
+ a
+ 0
+
+ +
+
+ 1
+
+
+ a
+ 1
+
+ +
+
+ 1
+
+
+ a
+ 2
+
+ +
+
+ 1
+
+
+ a
+ 3
+
+ +
+
+ 1
+
+
+ a
+ 4
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/8.mml b/tests/MathML/basic/good/8.mml
new file mode 100644
index 00000000..d99feab8
--- /dev/null
+++ b/tests/MathML/basic/good/8.mml
@@ -0,0 +1,14 @@
+
+
+ (
+
+ n
+
+ k
+ /
+ 2
+
+
+ )
+
+
\ No newline at end of file
diff --git a/tests/MathML/basic/good/9.mml b/tests/MathML/basic/good/9.mml
new file mode 100644
index 00000000..fc2a19cf
--- /dev/null
+++ b/tests/MathML/basic/good/9.mml
@@ -0,0 +1,44 @@
+
+
+
+ (
+
+ p
+ 2
+
+ )
+
+
+ x
+ 2
+
+
+ y
+
+ p
+ -
+ 2
+
+
+ -
+
+ 1
+
+ 1
+ -
+ x
+
+
+
+ 1
+
+ 1
+ -
+
+ x
+ 2
+
+
+
+
+
\ No newline at end of file