Skip to content

Commit 9b19ac3

Browse files
authored
Merge pull request #35 from mathjax/updates_to_tests
Updates new environment tests.
2 parents 31a6b8d + 7a83701 commit 9b19ac3

File tree

2 files changed

+75
-152
lines changed

2 files changed

+75
-152
lines changed

tests/parser-newcommand-tests.js

Lines changed: 73 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -530,32 +530,16 @@ parserTest.runTest(
530530
"scriptlevel": 0},
531531
"properties": {},
532532
"childNodes": [
533-
{"kind": "TeXAtom",
533+
{"kind": "mtext",
534534
"texClass": 0,
535-
"attributes": {},
535+
"attributes": {"mathvariant": "bold"},
536536
"inherited": {"displaystyle": true,
537537
"scriptlevel": 0},
538-
"properties": {"texClass": 0},
538+
"properties": {},
539539
"childNodes": [
540-
{"kind": "mrow",
541-
"texClass": 0,
542-
"attributes": {},
543-
"inherited": {"displaystyle": true,
544-
"scriptlevel": 0},
545-
"properties": {},
546-
"childNodes": [
547-
{"kind": "mtext",
548-
"texClass": 0,
549-
"attributes": {"mathvariant": "bold"},
550-
"inherited": {"displaystyle": true,
551-
"scriptlevel": 0},
552-
"properties": {},
553-
"childNodes": [
554-
{"kind": "text",
555-
"text": "Proof:"}],
556-
"isSpacelike": true}],
557-
"isInferred": true,
558-
"isSpacelike": true}]},
540+
{"kind": "text",
541+
"text": "Proof:"}],
542+
"isSpacelike": true},
559543
{"kind": "mi",
560544
"texClass": 0,
561545
"attributes": {},
@@ -591,12 +575,12 @@ parserTest.runTest(
591575
"texClass": 0,
592576
"attributes": {"displaystyle": true,
593577
"columnalign": "right left right left right left right left right left right left",
594-
"columnspacing": "0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em",
595-
"rowspacing": "3pt"},
596-
"inherited": {"scriptlevel": 0},
597-
"properties": {"useHeight": 1},
598-
"childNodes": [
599-
{"kind": "mtr",
578+
"columnspacing": "0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em",
579+
"rowspacing": "3pt"},
580+
"inherited": {"scriptlevel": 0},
581+
"properties": {"useHeight": 1},
582+
"childNodes": [
583+
{"kind": "mtr",
600584
"texClass": null,
601585
"attributes": {},
602586
"inherited": {"columnalign": "right left right left right left right left right left right left",
@@ -685,32 +669,16 @@ parserTest.runTest(
685669
"scriptlevel": 0},
686670
"properties": {},
687671
"childNodes": [
688-
{"kind": "TeXAtom",
672+
{"kind": "mtext",
689673
"texClass": 0,
690-
"attributes": {},
691-
"inherited": {"displaystyle": true,
692-
"scriptlevel": 0},
693-
"properties": {"texClass": 0},
694-
"childNodes": [
695-
{"kind": "mrow",
696-
"texClass": 0,
697-
"attributes": {},
698-
"inherited": {"displaystyle": true,
699-
"scriptlevel": 0},
700-
"properties": {},
701-
"childNodes": [
702-
{"kind": "mtext",
703-
"texClass": 0,
704-
"attributes": {"mathvariant": "bold"},
705-
"inherited": {"displaystyle": true,
706-
"scriptlevel": 0},
707-
"properties": {},
708-
"childNodes": [
709-
{"kind": "text",
710-
"text": "Proof:"}],
711-
"isSpacelike": true}],
712-
"isInferred": true,
713-
"isSpacelike": true}]},
674+
"attributes": {"mathvariant": "bold"},
675+
"inherited": {"displaystyle": true,
676+
"scriptlevel": 0},
677+
"properties": {},
678+
"childNodes": [
679+
{"kind": "text",
680+
"text": "Proof:"}],
681+
"isSpacelike": true},
714682
{"kind": "mi",
715683
"texClass": 0,
716684
"attributes": {},
@@ -796,33 +764,18 @@ parserTest.runTest(
796764
"scriptlevel": 0},
797765
"properties": {},
798766
"childNodes": [
799-
{"kind": "TeXAtom",
767+
{"kind": "mtext",
800768
"texClass": 0,
801-
"attributes": {},
769+
"attributes": {"mathvariant": "bold"},
802770
"inherited": {"displaystyle": true,
803771
"scriptlevel": 0},
804-
"properties": {"texClass": 0},
772+
"properties": {},
805773
"childNodes": [
806-
{"kind": "mrow",
807-
"texClass": 0,
808-
"attributes": {},
809-
"inherited": {"displaystyle": true,
810-
"scriptlevel": 0},
811-
"properties": {},
812-
"childNodes": [
813-
{"kind": "mtext",
814-
"texClass": 0,
815-
"attributes": {"mathvariant": "bold"},
816-
"inherited": {"displaystyle": true,
817-
"scriptlevel": 0},
818-
"properties": {},
819-
"childNodes": [
820-
{"kind": "text",
821-
"text": "Proof:"}],
822-
"isSpacelike": true}],
823-
"isInferred": true,
824-
"isSpacelike": true}]}],
825-
"isInferred": true}]},
774+
{"kind": "text",
775+
"text": "Proof:"}],
776+
"isSpacelike": true}],
777+
"isInferred": true,
778+
"isSpacelike": true}]},
826779
{"kind": "mtd",
827780
"texClass": null,
828781
"attributes": {},
@@ -858,19 +811,19 @@ parserTest.runTest(
858811
"displaystyle": true,
859812
"scriptlevel": 0},
860813
"properties": {},
814+
"childNodes": [
815+
{"kind": "mrow",
816+
"texClass": 0,
817+
"attributes": {},
818+
"inherited": {"displaystyle": true,
819+
"scriptlevel": 0},
820+
"properties": {},
861821
"childNodes": [
862-
{"kind": "mrow",
863-
"texClass": 0,
864-
"attributes": {},
865-
"inherited": {"displaystyle": true,
866-
"scriptlevel": 0},
867-
"properties": {},
868-
"childNodes": [
869-
{"kind": "mi",
870-
"texClass": 0,
871-
"attributes": {},
872-
"inherited": {"displaystyle": true,
873-
"scriptlevel": 0},
822+
{"kind": "mi",
823+
"texClass": 0,
824+
"attributes": {},
825+
"inherited": {"displaystyle": true,
826+
"scriptlevel": 0},
874827
"properties": {},
875828
"childNodes": []},
876829
{"kind": "mo",
@@ -1005,44 +958,28 @@ parserTest.runTest(
1005958
"scriptlevel": 0},
1006959
"properties": {},
1007960
"childNodes": [
1008-
{"kind": "TeXAtom",
961+
{"kind": "mtext",
1009962
"texClass": 0,
1010-
"attributes": {},
963+
"attributes": {"mathvariant": "bold"},
1011964
"inherited": {"displaystyle": true,
1012965
"scriptlevel": 0},
1013-
"properties": {"texClass": 0},
966+
"properties": {},
1014967
"childNodes": [
1015-
{"kind": "mrow",
1016-
"texClass": 0,
1017-
"attributes": {},
1018-
"inherited": {"displaystyle": true,
1019-
"scriptlevel": 0},
1020-
"properties": {},
1021-
"childNodes": [
1022-
{"kind": "mtext",
1023-
"texClass": 0,
1024-
"attributes": {"mathvariant": "bold"},
1025-
"inherited": {"displaystyle": true,
1026-
"scriptlevel": 0},
1027-
"properties": {},
1028-
"childNodes": [
1029-
{"kind": "text",
1030-
"text": "Argument c:"}],
1031-
"isSpacelike": true}],
1032-
"isInferred": true,
1033-
"isSpacelike": true}]},
968+
{"kind": "text",
969+
"text": "Argument c:"}],
970+
"isSpacelike": true},
1034971
{"kind": "mi",
1035-
"texClass": 0,
1036-
"attributes": {},
1037-
"inherited": {"displaystyle": true,
1038-
"scriptlevel": 0,
1039-
"mathvariant": "italic"},
1040-
"properties": {},
1041-
"childNodes": [
1042-
{"kind": "text",
1043-
"text": "b"}]},
972+
"texClass": 0,
973+
"attributes": {},
974+
"inherited": {"displaystyle": true,
975+
"scriptlevel": 0,
976+
"mathvariant": "italic"},
977+
"properties": {},
978+
"childNodes": [
979+
{"kind": "text",
980+
"text": "b"}]},
1044981
{"kind": "mi",
1045-
"texClass": 0,
982+
"texClass": 0,
1046983
"attributes": {},
1047984
"inherited": {"displaystyle": true,
1048985
"scriptlevel": 0,
@@ -1080,44 +1017,28 @@ parserTest.runTest(
10801017
"scriptlevel": 0},
10811018
"properties": {},
10821019
"childNodes": [
1083-
{"kind": "TeXAtom",
1020+
{"kind": "mtext",
10841021
"texClass": 0,
1085-
"attributes": {},
1022+
"attributes": {"mathvariant": "bold"},
10861023
"inherited": {"displaystyle": true,
10871024
"scriptlevel": 0},
1088-
"properties": {"texClass": 0},
1025+
"properties": {},
10891026
"childNodes": [
1090-
{"kind": "mrow",
1091-
"texClass": 0,
1092-
"attributes": {},
1093-
"inherited": {"displaystyle": true,
1094-
"scriptlevel": 0},
1095-
"properties": {},
1096-
"childNodes": [
1097-
{"kind": "mtext",
1098-
"texClass": 0,
1099-
"attributes": {"mathvariant": "bold"},
1100-
"inherited": {"displaystyle": true,
1101-
"scriptlevel": 0},
1102-
"properties": {},
1103-
"childNodes": [
1104-
{"kind": "text",
1105-
"text": "Argument c(3):"}],
1106-
"isSpacelike": true}],
1107-
"isInferred": true,
1108-
"isSpacelike": true}]},
1027+
{"kind": "text",
1028+
"text": "Argument c(3):"}],
1029+
"isSpacelike": true},
11091030
{"kind": "mi",
1110-
"texClass": 0,
1111-
"attributes": {},
1112-
"inherited": {"displaystyle": true,
1113-
"scriptlevel": 0,
1114-
"mathvariant": "italic"},
1115-
"properties": {},
1116-
"childNodes": [
1117-
{"kind": "text",
1118-
"text": "b"}]},
1031+
"texClass": 0,
1032+
"attributes": {},
1033+
"inherited": {"displaystyle": true,
1034+
"scriptlevel": 0,
1035+
"mathvariant": "italic"},
1036+
"properties": {},
1037+
"childNodes": [
1038+
{"kind": "text",
1039+
"text": "b"}]},
11191040
{"kind": "mi",
1120-
"texClass": 0,
1041+
"texClass": 0,
11211042
"attributes": {},
11221043
"inherited": {"displaystyle": true,
11231044
"scriptlevel": 0,

tools/test-diff.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@
125125

126126
;;; Replacing an entire file
127127

128+
;;; file: The source file
129+
;;; diff: The diff file
128130
(defun replace-all-in-file (file diff &optional dir)
129131
(interactive)
130132
(find-file (if dir

0 commit comments

Comments
 (0)