Skip to content

Commit

Permalink
Add test for mathjax/MathJax#1154
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Aug 11, 2016
1 parent ab848f9 commit eb462c2
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions testsuite/MathMLToDisplay/Characters/issue1154.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>Issue 1154</title>
<!-- Copyright (c) 2016 MathJax Consortium
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../header.js"></script>
<script type="text/javascript" src="../../scriptTests.js"></script>

<script type="text/javascript">
function getTestCases() {
var mml = MathJax.Hub.getAllJax();
var c0, c1, OK0, OK1
c0 = mml[0].root.data[0].data[0];
if (gOutputJax === "HTML-CSS") {
c1 = mml[1].root.data[0].data[0];
OK0 = (c0.HTMLspanElement().bbox.d > .05);
OK1 = (c1.HTMLspanElement().bbox.d < .05);
} else if (gOutputJax === "SVG") {
c1 = mml[2].root.data[0].data[0];
OK0 = (c0.SVGdata.d > 50);
OK1 = (c1.SVGdata.d < 50);
}
return [
newScriptReftestResult("| has descender ", OK0),
newScriptReftestResult("| variant has none ", OK1)
];
}
</script>
</head>

<body>

<!-- Swap | and its variant in STIX fonts
https://github.com/mathjax/MathJax/issues/1154 -->

<div>
<math>
<mo>|</mo>
</math>
<math>
<mo mathvariant="-STIX-variant">|</mo>
</math>
<math>
<mo mathvariant="-STIX-Web-variant">|</mo>
</math>
</div>

</body>
</html>
1 change: 1 addition & 0 deletions testsuite/MathMLToDisplay/Characters/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ script issue826-1.html
require(!NativeMML) script issue826-2.html
require(SVG) load issue898-1.html
require(SVG) script issue898-2.html
require((SVG&&STIX-Web)||(HTML-CSS&&STIX)) sript issue1154.html
require(SVG&&STIX-Web) script issue1251.html
require(CommonHTML) script issue1353.html
require(CommonHTML) script issue1451.html

0 comments on commit eb462c2

Please sign in to comment.