1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
|
[ Para [ Span ( "front.xhtml" , [] , [] ) [] ]
, Div
( "" , [ "section" ] , [] )
[ Header
1
( "" , [] , [] )
[ Str "Reflowable EPUB 3 Conformance Test Document: 0100" ]
, Div
( "" , [ "section" ] , [] )
[ Header
2 ( "" , [] , [] ) [ Str "Status of this Document" ]
, Para
[ Str "This publication is currently considered "
, Span
( "" , [ "status" ] , [] )
[ Str "[UNDER DEVELOPMENT]" ]
, Str " by the IDPF."
]
, Para
[ Str "This publication is part of version "
, Span ( "" , [ "version" ] , [] ) [ Str "X.X" ]
, Str " of the EPUB 3.0 Compliance Test Suite released"
, SoftBreak
, Str "on "
, RawInline (Format "html") "<time class=\"release\">"
, Str "TBD"
, RawInline (Format "html") "</time>"
, Str "."
]
, Para
[ Str
"Before using this publication to evaluate reading systems, testers are strongly encouraged to"
, SoftBreak
, Str
"verify that they have the latest release by checking the current release version and date of"
, SoftBreak
, Str "the test suite at "
, Link
( "" , [] , [] )
[ Str "TBD" ]
( "http://idpf.org/" , "" )
]
, Para
[ Str
"This publication is one of several that currently comprise the EPUB 3 conformance test suite"
, SoftBreak
, Str
"for reflowable content. The complete test suite includes all of the following publications:"
]
, OrderedList
( 1 , DefaultStyle , DefaultDelim )
[ [ Plain [ Str "." ] ] ]
]
, Div
( "" , [ "section" ] , [] )
[ Header 2 ( "" , [] , [] ) [ Str "About this Document" ]
, Para
[ Str
"This document focuses on human-evaluated binary (pass/fail) tests in a"
, SoftBreak
, Str
"reflowable context. Tests for fixed-layout content and other individual tests that"
, SoftBreak
, Str
"require a dedicated epub file are available in additional sibling documents; refer to"
, SoftBreak
, Str "the "
, Link
( "" , [] , [] )
[ Str "test suite" , SoftBreak , Str "wiki" ]
( "https://github.com/mgylling/epub-testsuite/wiki/Overview"
, ""
)
, Str " ("
, Code
( "" , [] , [] )
"https://github.com/mgylling/epub-testsuite/wiki/Overview"
, Str ") for additional"
, SoftBreak
, Str "information."
]
]
, Div
( "" , [ "section" ] , [] )
[ Header 2 ( "" , [] , [] ) [ Str "Conventions" ]
, Para
[ Str
"The following conventions are used throughout the document:"
]
, DefinitionList
[ ( [ Str "1. Locating a test" ]
, [ [ Div
( "" , [ "ctest" ] , [] )
[ Para
[ Str "Tests for "
, Emph [ Str "required" ]
, Str " Reading System functionality are"
, SoftBreak
, Str "preceded by the label: "
, Span
( ""
, [ "nature" ]
, [ ( "style"
, "display: inline; font-size: 100%"
)
]
)
[ Str "[REQUIRED]" ]
]
]
, Div
( "" , [ "otest" ] , [] )
[ Para
[ Str "Tests for "
, Emph [ Str "optional" ]
, Str " Reading System functionality are"
, SoftBreak
, Str "preceded by the label: "
, Span
( ""
, [ "nature" ]
, [ ( "style"
, "display: inline; font-size: 100%"
)
]
)
[ Str "[OPTIONAL]" ]
]
]
]
]
)
, ( [ Str "2. Performing the test" ]
, [ [ Plain
[ Str
"Each test includes a description of its purpose followed by the actual "
, Strong
[ Str "test statement,"
, SoftBreak
, Str
"which can always be evaluated to true or false"
]
, Str
". These statements typically have the form:"
, SoftBreak
, Str
"\"If [some condition], the test passes\"."
]
]
]
)
, ( [ Str "3. Scoring in the results form" ]
, [ [ Plain
[ Str
"@@@TODO provide info on where to get the results form"
]
]
]
)
]
]
]
, Para [ Span ( "content-mathml-001.xhtml" , [] , [] ) [] ]
, Div
( "" , [ "section" ] , [] )
[ Header
2
( "content-mathml-001.xhtml#mathml" , [] , [] )
[ Str "MathML" ]
, Div
( "content-mathml-001.xhtml#mathml-010"
, [ "section" , "ctest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-010" ]
, Str " Rendering"
]
, Para
[ Str
"Tests whether MathML equation rendering is supported."
]
, Plain
[ Math
DisplayMath
"\\int_{- \\infty}^{\\infty}e^{- x^{2}}\\, dx = \\sqrt{\\pi}"
, SoftBreak
, Math
DisplayMath
"\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}"
, SoftBreak
, Math
DisplayMath
"x = \\frac{- b \\pm \\sqrt{b^{2} - 4ac}}{2a}"
]
, Para
[ Str
"If the preceding equations are not presented as linear text (e.g., x=-b\177b2-4ac2a),"
, SoftBreak
, Str "the test passes."
]
]
, Div
( "content-mathml-001.xhtml#mathml-020"
, [ "section" , "otest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-020" ]
, Str " CSS Styling of the "
, Code ( "" , [] , [] ) "math"
, Str " element"
]
, Para
[ Str
"Tests whether basic CSS styling of MathML is supported on the "
, Code ( "" , [] , [] ) "math"
, Str " element."
]
, Plain [ Math InlineMath "{2x}{+ y - z}" ]
, Para
[ Str
"The test passes if the equation has a yellow background and a dashed border."
]
, Para
[ Str
"If the reading system does not have a viewport, or does not support"
, SoftBreak
, Str "CSS styles, this test should be marked "
, Code ( "" , [] , [] ) "Not Supported"
, Str "."
]
]
, Div
( "content-mathml-001.xhtml#mathml-021"
, [ "section" , "otest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-021" ]
, Str " CSS Styling of the "
, Code ( "" , [] , [] ) "mo"
, Str " element"
]
, Para
[ Str
"Tests whether basic CSS styling of MathML is supported on the "
, Code ( "" , [] , [] ) "mo"
, Str " element."
]
, Plain [ Math InlineMath "{2x}{+ y - z}" ]
, Para
[ Str
"The test passes if the operators are enlarged relative to the other symbols and numbers."
]
, Para
[ Str
"If the reading system does not have a viewport, or does not support"
, SoftBreak
, Str "CSS styles, this test should be marked "
, Code ( "" , [] , [] ) "Not Supported"
, Str "."
]
]
, Div
( "content-mathml-001.xhtml#mathml-022"
, [ "section" , "otest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-022" ]
, Str " CSS Styling of the "
, Code ( "" , [] , [] ) "mi"
, Str " element"
]
, Para
[ Str
"Tests whether basic CSS styling of MathML is supported on the "
, Code ( "" , [] , [] ) "mi"
, Str " element."
]
, Plain [ Math InlineMath "{2x}{+ y - z}" ]
, Para
[ Str
"The test passes if the identifiers are bolded and blue."
]
, Para
[ Str
"If the reading system does not have a viewport, or does not support"
, SoftBreak
, Str "CSS styles, this test should be marked "
, Code ( "" , [] , [] ) "Not Supported"
, Str "."
]
]
, Div
( "content-mathml-001.xhtml#mathml-023"
, [ "section" , "otest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-023" ]
, Str " CSS Styling of the "
, Code ( "" , [] , [] ) "mn"
, Str " element"
]
, Para
[ Str
"Tests whether basic CSS styling of MathML is supported on the "
, Code ( "" , [] , [] ) "mn"
, Str " element."
]
, Plain [ Math InlineMath "{2x}{+ y - z}" ]
, Para
[ Str
"The test passes if the number 2 is italicized and blue."
]
, Para
[ Str
"If the reading system does not have a viewport, or does not support"
, SoftBreak
, Str "CSS styles, this test should be marked "
, Code ( "" , [] , [] ) "Not Supported"
, Str "."
]
]
, Div
( "content-mathml-001.xhtml#mathml-024"
, [ "section" , "ctest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-024" ]
, Str "Horizontal stretch, "
, Code ( "" , [] , [] ) "mover"
, Str ", "
, Code ( "" , [] , [] ) "munder"
, Str ", and "
, Code ( "" , [] , [] ) "mspace"
, Str " elements"
]
, Para
[ Str "Tests whether horizontal stretch, "
, Code ( "" , [] , [] ) "mover"
, Str ", "
, Code ( "" , [] , [] ) "munder"
, Str ", "
, Code ( "" , [] , [] ) "mspace"
, Str " elements are supported."
]
, Plain
[ Math
DisplayMath
"c = \\overset{\\text{complex\\ number}}{\\overbrace{\\underset{\\text{real}}{\\underbrace{\\mspace{20mu} a\\mspace{20mu}}} + \\underset{\\text{imaginary}}{\\underbrace{\\quad b{\\mathbb{i}}\\quad}}}}"
]
, Para
[ Str "The test passes if the rendering looks like ." ]
]
, Div
( "content-mathml-001.xhtml#mathml-025"
, [ "section" , "ctest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-025" ]
, Str "Testing "
, Code ( "" , [] , [] ) "mtable"
, Str " with "
, Code ( "" , [] , [] ) "colspan"
, Str " and "
, Code ( "" , [] , [] ) "rowspan"
, Str " attributes, Hebrew and Script fonts"
]
, Para
[ Str "Tests whether "
, Code ( "" , [] , [] ) "mtable"
, Str " with "
, Code ( "" , [] , [] ) "colspan"
, Str " and "
, Code ( "" , [] , [] ) "mspace"
, Str
" attributes (column and row spanning) are supported; uses Hebrew and Script alphabets."
]
, Plain
[ Math
DisplayMath
"\\begin{matrix}\n & {\\operatorname{cov}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{L})} & \\longrightarrow & 2^{\\aleph_{0}} \\\\\n & \\uparrow & & \\uparrow & & \\uparrow & & \\uparrow & & \\\\\n & {\\mathfrak{b}} & \\longrightarrow & {\\mathfrak{d}} & & & & & & \\\\\n & \\uparrow & & \\uparrow & & & & & & \\\\\n\\aleph_{1} & \\longrightarrow & {\\operatorname{add}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{add}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cov}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{L})} & \\\\\n\\end{matrix}"
]
, Para
[ Str "The test passes if the rendering looks like "
, Link
( "" , [] , [] )
[ Str "Cicho\324's Diagram" ]
( "http://en.wikipedia.org/wiki/Cicho%C5%84's_diagram"
, ""
)
, Str ": ."
]
]
, Div
( "content-mathml-001.xhtml#mathml-026"
, [ "section" , "ctest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-026" ]
, Str "BiDi, RTL and Arabic alphabets"
]
, Para
[ Str
"Tests whether right-to-left and Arabic alphabets are supported."
]
, Plain
[ Math
DisplayMath
"{\1583(\1587)} = \\left\\{ \\begin{matrix}\n{\\sum\\limits_{\1646 = 1}^{\1589}\1587^{\1646}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 > 0} \\\\\n{\\int_{1}^{\1589}{\1587^{\1646}\1569\1587}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 \\in \1605} \\\\\n{{\1591\1575}\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{matrix} \\right."
]
, Para
[ Str
"The test passes if the rendering looks like the following image:"
]
]
, Div
( "content-mathml-001.xhtml#mathml-027"
, [ "section" , "ctest" ]
, []
)
[ Header
2
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-027" ]
, Str "Elementary math: long division notation"
]
, Para
[ Str "Tests whether "
, Code ( "" , [] , [] ) "mlongdiv"
, Str " elements (from elementary math) are supported."
]
, Plain
[ Span
( ""
, [ "math" ]
, [ ( "xmlns" , "http://www.w3.org/1998/Math/MathML" )
]
)
[ SoftBreak
, Str "3"
, SoftBreak
, Str "435.3"
, SoftBreak
, Str "1306"
, SoftBreak
, Str "12"
, SoftBreak
, Str "10"
, SoftBreak
, Str "9"
, SoftBreak
, Str "16"
, SoftBreak
, Str "15"
, SoftBreak
, Str "1.0"
, SoftBreak
, Str "9"
, SoftBreak
, Str "1"
, SoftBreak
]
]
, Para
[ Str
"The test passes if the rendering looks like the following image: ."
]
]
]
, Para [ Span ( "content-switch-001.xhtml" , [] , [] ) [] ]
, Div
( "content-switch-001.xhtml#epub-switch"
, [ "section" ]
, []
)
[ Header
3 ( "" , [] , [] ) [ Code ( "" , [] , [] ) "epub:switch" ]
, Div
( "content-switch-001.xhtml#switch-010"
, [ "section" , "ctest" ]
, []
)
[ Header
4
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
, Str " "
, Span ( "" , [ "test-id" ] , [] ) [ Str "switch-010" ]
, Str " Support"
]
, Para
[ Str "Tests whether the "
, Code ( "" , [] , [] ) "epub:switch"
, Str " element is supported."
]
, Para [ Str "PASS" ]
, Para
[ Str
"If only the word \"PASS\" is rendered before this paragraph, the test passes. If both \"PASS\" and \"FAIL\" are rendered, or neither"
, SoftBreak
, Str "\"PASS\" nor \"FAIL\" is rendered, the test fails."
]
]
, Div
( "content-switch-001.xhtml#switch-020"
, [ "section" , "otest" ]
, []
)
[ Header
4
( "" , [] , [] )
[ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
, SoftBreak
, Span ( "" , [ "test-id" ] , [] ) [ Str "switch-020" ]
, SoftBreak
, Str "MathML Embedding"
]
, Para
[ Str
"Tests whether the MathML namespace is recognized when used in an "
, Code ( "" , [] , [] ) "epub:case"
, Str " element."
]
, Para [ Math InlineMath "{2x}{+ y - z}" ]
, Para
[ Str
"If a MathML equation is rendered before this paragraph, the test passes."
]
, Para
[ Str "If test "
, Code ( "" , [] , [] ) "switch-010"
, Str " did not pass, this test should be marked "
, Code ( "" , [] , [] ) "Not Supported"
, Str "."
]
]
]
]
|