Skip to content

Commit 8db821d

Browse files
authored
Merge pull request #38 from mathjax/rewrite_tests
Rewrite tests
2 parents 799ba9c + 6492309 commit 8db821d

File tree

212 files changed

+363673
-4050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+363673
-4050
lines changed

tests/json/ParserActionTest.json

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
{
2+
"name": "ParserActionTest",
3+
"factory": "parserTest",
4+
"packages": [
5+
"base",
6+
"action"
7+
],
8+
"settings": {
9+
"tags": "none"
10+
},
11+
"tests": {
12+
"TextTip": {
13+
"input": "\\texttip{A}{B}",
14+
"expected": {
15+
"kind": "math",
16+
"texClass": 0,
17+
"attributes": {
18+
"display": "block"
19+
},
20+
"inherited": {
21+
"displaystyle": true,
22+
"scriptlevel": 0
23+
},
24+
"properties": {},
25+
"childNodes": [
26+
{
27+
"kind": "mrow",
28+
"texClass": 0,
29+
"attributes": {},
30+
"inherited": {
31+
"displaystyle": true,
32+
"scriptlevel": 0
33+
},
34+
"properties": {},
35+
"childNodes": [
36+
{
37+
"kind": "maction",
38+
"texClass": 0,
39+
"attributes": {
40+
"actiontype": "tooltip"
41+
},
42+
"inherited": {
43+
"displaystyle": true,
44+
"scriptlevel": 0
45+
},
46+
"properties": {},
47+
"childNodes": [
48+
{
49+
"kind": "mi",
50+
"texClass": 0,
51+
"attributes": {},
52+
"inherited": {
53+
"displaystyle": true,
54+
"scriptlevel": 0,
55+
"mathvariant": "italic"
56+
},
57+
"properties": {},
58+
"childNodes": [
59+
{
60+
"kind": "text",
61+
"text": "A"
62+
}
63+
]
64+
},
65+
{
66+
"kind": "mtext",
67+
"texClass": 0,
68+
"attributes": {},
69+
"inherited": {
70+
"displaystyle": true,
71+
"scriptlevel": 0
72+
},
73+
"properties": {},
74+
"childNodes": [
75+
{
76+
"kind": "text",
77+
"text": "B"
78+
}
79+
],
80+
"isSpacelike": true
81+
}
82+
]
83+
}
84+
],
85+
"isInferred": true
86+
}
87+
]
88+
}
89+
},
90+
"MathTip": {
91+
"input": "\\mathtip{A}{B}",
92+
"expected": {
93+
"kind": "math",
94+
"texClass": 0,
95+
"attributes": {
96+
"display": "block"
97+
},
98+
"inherited": {
99+
"displaystyle": true,
100+
"scriptlevel": 0
101+
},
102+
"properties": {},
103+
"childNodes": [
104+
{
105+
"kind": "mrow",
106+
"texClass": 0,
107+
"attributes": {},
108+
"inherited": {
109+
"displaystyle": true,
110+
"scriptlevel": 0
111+
},
112+
"properties": {},
113+
"childNodes": [
114+
{
115+
"kind": "maction",
116+
"texClass": 0,
117+
"attributes": {
118+
"actiontype": "tooltip"
119+
},
120+
"inherited": {
121+
"displaystyle": true,
122+
"scriptlevel": 0
123+
},
124+
"properties": {},
125+
"childNodes": [
126+
{
127+
"kind": "mi",
128+
"texClass": 0,
129+
"attributes": {},
130+
"inherited": {
131+
"displaystyle": true,
132+
"scriptlevel": 0,
133+
"mathvariant": "italic"
134+
},
135+
"properties": {},
136+
"childNodes": [
137+
{
138+
"kind": "text",
139+
"text": "A"
140+
}
141+
]
142+
},
143+
{
144+
"kind": "mi",
145+
"texClass": 0,
146+
"attributes": {},
147+
"inherited": {
148+
"displaystyle": true,
149+
"scriptlevel": 0,
150+
"mathvariant": "italic"
151+
},
152+
"properties": {},
153+
"childNodes": [
154+
{
155+
"kind": "text",
156+
"text": "B"
157+
}
158+
]
159+
}
160+
]
161+
}
162+
],
163+
"isInferred": true
164+
}
165+
]
166+
}
167+
},
168+
"Toggle": {
169+
"input": "\\toggle A B C \\endtoggle",
170+
"expected": {
171+
"kind": "math",
172+
"texClass": 0,
173+
"attributes": {
174+
"display": "block"
175+
},
176+
"inherited": {
177+
"displaystyle": true,
178+
"scriptlevel": 0
179+
},
180+
"properties": {},
181+
"childNodes": [
182+
{
183+
"kind": "mrow",
184+
"texClass": 0,
185+
"attributes": {},
186+
"inherited": {
187+
"displaystyle": true,
188+
"scriptlevel": 0
189+
},
190+
"properties": {},
191+
"childNodes": [
192+
{
193+
"kind": "maction",
194+
"texClass": 0,
195+
"attributes": {},
196+
"inherited": {
197+
"displaystyle": true,
198+
"scriptlevel": 0
199+
},
200+
"properties": {},
201+
"childNodes": [
202+
{
203+
"kind": "mi",
204+
"texClass": 0,
205+
"attributes": {},
206+
"inherited": {
207+
"displaystyle": true,
208+
"scriptlevel": 0,
209+
"mathvariant": "italic"
210+
},
211+
"properties": {},
212+
"childNodes": [
213+
{
214+
"kind": "text",
215+
"text": "A"
216+
}
217+
]
218+
},
219+
{
220+
"kind": "mi",
221+
"texClass": 0,
222+
"attributes": {},
223+
"inherited": {
224+
"displaystyle": true,
225+
"scriptlevel": 0,
226+
"mathvariant": "italic"
227+
},
228+
"properties": {},
229+
"childNodes": [
230+
{
231+
"kind": "text",
232+
"text": "B"
233+
}
234+
]
235+
},
236+
{
237+
"kind": "mi",
238+
"texClass": 0,
239+
"attributes": {},
240+
"inherited": {
241+
"displaystyle": true,
242+
"scriptlevel": 0,
243+
"mathvariant": "italic"
244+
},
245+
"properties": {},
246+
"childNodes": [
247+
{
248+
"kind": "text",
249+
"text": "C"
250+
}
251+
]
252+
}
253+
]
254+
}
255+
],
256+
"isInferred": true
257+
}
258+
]
259+
}
260+
}
261+
}
262+
}

0 commit comments

Comments
 (0)