Skip to content

Commit

Permalink
Merge pull request #283 from mathjax/update_tests
Browse files Browse the repository at this point in the history
Update tests
  • Loading branch information
zorkow authored Jun 12, 2019
2 parents d9b91a1 + d82cbac commit f849fba
Show file tree
Hide file tree
Showing 125 changed files with 101,121 additions and 16,837 deletions.
11 changes: 10 additions & 1 deletion mathjax3-ts/a11y/complexity/collapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,26 @@ export class Collapse {
}
}

private idCount = 0;
/**
* @return {string} A unique id string.
*/
private makeId(): string {
return 'mjx-collapse-' + this.idCount++;
}

public makeAction(node: MmlNode) {
if (node.isKind('math')) {
node = this.addMrow(node);
}
const factory = this.complexity.factory;
const marker = node.getProperty('collapse-marker') as string;
const parent = node.parent;
var maction = factory.create('maction', {
let maction = factory.create('maction', {
actiontype: 'toggle',
selection: 2,
'data-collapsible': true,
id: this.makeId(),
'data-semantic-complexity': node.attributes.get('data-semantic-complexity')
}, [
factory.create('mtext', {mathcolor: 'blue'}, [
Expand Down
2 changes: 1 addition & 1 deletion mathjax3-ts/a11y/explorer/Explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class SpeechExplorer extends AbstractKeyExplorer implements KeyExplorer {
const jax = this.document.outputJax.name;
this.highlighter = sre.HighlighterFactory.highlighter(
this.background, this.foreground,
{renderer: jax === 'CHTML' ? 'CommonHTML' : jax}
{renderer: jax}
);
// Add speech
this.speechGenerator = new sre.TreeSpeechGenerator();
Expand Down
155 changes: 77 additions & 78 deletions tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ $# -eq 0 ]; then
if [ $# -eq 0 ]; then

node load.js tests/tex-keyval-tests.js

Expand All @@ -16,6 +16,9 @@ if [ $# -eq 0 ]; then
node load.js tests/parser-error-tests.js
node load.js tests/parser-complex-tests.js
node load.js tests/parser-internal-math-tests.js
node load.js tests/parser-multline-shove-tests.js
node load.js tests/parser-matrix-tests.js


# AMS package tests.
node load.js tests/parser-ams-tests.js
Expand All @@ -28,92 +31,88 @@ if [ $# -eq 0 ]; then
node load.js tests/parser-tag-ams-tests.js
node load.js tests/parser-tag-all-tests.js

node load.js tests/parser-multline-shove-tests.js

node load.js tests/parser-matrix-tests.js

# Other packages
node load.js tests/parser-noundefined-tests.js
# Other standard packages
node load.js tests/parser-action-tests.js
node load.js tests/parser-amscd-tests.js
node load.js tests/parser-bbox-tests.js
node load.js tests/parser-boldsymbol-tests.js
node load.js tests/parser-cancel-tests.js
node load.js tests/parser-cancel-tests.js
node load.js tests/parser-enclose-tests.js
node load.js tests/parser-extpfeil-tests.js
node load.js tests/parser-html-tests.js
node load.js tests/parser-ncerror-tests.js
node load.js tests/parser-newcommand-tests.js
node load.js tests/parser-ncerrors-tests.js
node load.js tests/parser-noerror-tests.js
node load.js tests/parser-noundefined-tests.js
node load.js tests/parser-unicode-tests.js
node load.js tests/parser-verb-tests.js

# BraKet package.
node load.js tests/parser-braket-tests.js

node load.js tests/parser-mhchem0-tests.js
node load.js tests/parser-mhchem1-tests.js
node load.js tests/parser-mhchem2-tests.js
node load.js tests/parser-mhchem3-tests.js
node load.js tests/parser-mhchem4-tests.js
node load.js tests/parser-mhchem5-tests.js
node load.js tests/parser-mhchem6-tests.js
node load.js tests/parser-mhchem7-tests.js
node load.js tests/parser-mhchem8-tests.js
node load.js tests/parser-mhchem9-tests.js

node load.js tests/parser-noerrors-tests.js
node load.js tests/parser-enclose-tests.js
node load.js tests/parser-cancel-tests.js
node load.js tests/parser-extpfeil-tests.js
node load.js tests/parser-amscd-tests.js
# mhchem package.
node load.js tests/parser-mhchem-0-tests.js
node load.js tests/parser-mhchem-1-tests.js
node load.js tests/parser-mhchem-2-tests.js
node load.js tests/parser-mhchem-3-tests.js
node load.js tests/parser-mhchem-4-tests.js
node load.js tests/parser-mhchem-5-tests.js
node load.js tests/parser-mhchem-6-tests.js
node load.js tests/parser-mhchem-7-tests.js
node load.js tests/parser-mhchem-8-tests.js
node load.js tests/parser-mhchem-9-tests.js

## Physics package.
node load.js tests/parser-physics-1-0-test.js
node load.js tests/parser-physics-1-1-test.js
node load.js tests/parser-physics-1-2-test.js
node load.js tests/parser-physics-1-3-test.js
node load.js tests/parser-physics-1-4-test.js
node load.js tests/parser-physics-1-5-test.js
node load.js tests/parser-physics-1-6-test.js
node load.js tests/parser-physics-1-7-test.js
node load.js tests/parser-physics-2-0-test.js
node load.js tests/parser-physics-2-1-test.js
node load.js tests/parser-physics-2-2-test.js
node load.js tests/parser-physics-2-3-test.js
node load.js tests/parser-physics-2-4-test.js
node load.js tests/parser-physics-2-5-test.js
node load.js tests/parser-physics-2-6-test.js
node load.js tests/parser-physics-2-7-test.js
node load.js tests/parser-physics-3-0-test.js
node load.js tests/parser-physics-3-1-test.js
node load.js tests/parser-physics-3-2-test.js
node load.js tests/parser-physics-3-3-test.js
node load.js tests/parser-physics-3-4-test.js
node load.js tests/parser-physics-3-5-test.js
node load.js tests/parser-physics-3-6-test.js
node load.js tests/parser-physics-3-7-test.js
node load.js tests/parser-physics-4-0-test.js
node load.js tests/parser-physics-5-0-test.js
node load.js tests/parser-physics-5-1-test.js
node load.js tests/parser-physics-5-2-test.js
node load.js tests/parser-physics-5-3-test.js
node load.js tests/parser-physics-5-4-test.js
node load.js tests/parser-physics-5-5-test.js
node load.js tests/parser-physics-6-0-test.js
node load.js tests/parser-physics-6-1-test.js
node load.js tests/parser-physics-6-2-test.js
node load.js tests/parser-physics-6-3-test.js
node load.js tests/parser-physics-6-4-test.js
node load.js tests/parser-physics-7-0-test.js
node load.js tests/parser-physics-7-1-test.js
node load.js tests/parser-physics-7-2-test.js
node load.js tests/parser-physics-7-3-test.js
node load.js tests/parser-physics-7-4-test.js
node load.js tests/parser-physics-7-5-test.js
node load.js tests/parser-physics-7-6-test.js
node load.js tests/parser-physics-7-7-test.js
node load.js tests/parser-physics-7-8-test.js
node load.js tests/parser-physics-7-9-test.js
node load.js tests/parser-physics-7-10-test.js
node load.js tests/parser-physics-7-11-test.js
node load.js tests/parser-physics-1-0-tests.js
node load.js tests/parser-physics-1-1-tests.js
node load.js tests/parser-physics-1-2-tests.js
node load.js tests/parser-physics-1-3-tests.js
node load.js tests/parser-physics-1-4-tests.js
node load.js tests/parser-physics-1-5-tests.js
node load.js tests/parser-physics-1-6-tests.js
node load.js tests/parser-physics-1-7-tests.js
node load.js tests/parser-physics-2-0-tests.js
node load.js tests/parser-physics-2-1-tests.js
node load.js tests/parser-physics-2-2-tests.js
node load.js tests/parser-physics-2-3-tests.js
node load.js tests/parser-physics-2-4-tests.js
node load.js tests/parser-physics-2-5-tests.js
node load.js tests/parser-physics-2-6-tests.js
node load.js tests/parser-physics-2-7-tests.js
node load.js tests/parser-physics-3-0-tests.js
node load.js tests/parser-physics-3-1-tests.js
node load.js tests/parser-physics-3-2-tests.js
node load.js tests/parser-physics-3-3-tests.js
node load.js tests/parser-physics-3-4-tests.js
node load.js tests/parser-physics-3-5-tests.js
node load.js tests/parser-physics-3-6-tests.js
node load.js tests/parser-physics-3-7-tests.js
node load.js tests/parser-physics-4-0-tests.js
node load.js tests/parser-physics-5-0-tests.js
node load.js tests/parser-physics-5-1-tests.js
node load.js tests/parser-physics-5-2-tests.js
node load.js tests/parser-physics-5-3-tests.js
node load.js tests/parser-physics-5-4-tests.js
node load.js tests/parser-physics-5-5-tests.js
node load.js tests/parser-physics-6-0-tests.js
node load.js tests/parser-physics-6-1-tests.js
node load.js tests/parser-physics-6-2-tests.js
node load.js tests/parser-physics-6-3-tests.js
node load.js tests/parser-physics-6-4-tests.js
node load.js tests/parser-physics-7-0-tests.js
node load.js tests/parser-physics-7-1-tests.js
node load.js tests/parser-physics-7-2-tests.js
node load.js tests/parser-physics-7-3-tests.js
node load.js tests/parser-physics-7-4-tests.js
node load.js tests/parser-physics-7-5-tests.js
node load.js tests/parser-physics-7-6-tests.js
node load.js tests/parser-physics-7-7-tests.js
node load.js tests/parser-physics-7-8-tests.js
node load.js tests/parser-physics-7-9-tests.js
node load.js tests/parser-physics-7-10-tests.js
node load.js tests/parser-physics-7-11-tests.js

# More Packages
node load.js tests/parser-bbox-tests.js
node load.js tests/parser-action-tests.js
node load.js tests/parser-html-tests.js
node load.js tests/parser-unicode-tests.js
node load.js tests/parser-cancel-tests.js
exit 0
else
repeat=$1
Expand Down
Loading

0 comments on commit f849fba

Please sign in to comment.