• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..30-Mar-2022-

support/H03-May-2022-2,3031,630

tests/H03-May-2022-1,5421,064

tools/H30-Mar-2022-932568

README.mdH A D30-Mar-20221.1 KiB5335

categories.jsonH A D30-Mar-2022125 76

README.md

1# Tests for http://w3c.github.io/webvtt/#file-parsing
2
3Tests that expect an 'error' event (due to invalid signature) are:
4
5```bash
6./signature-invalid.html
7./support/*.vtt
8```
9
10Other tests are generated from source files with a custom format. The source files are:
11
12```bash
13./support/*.test
14```
15
16## .test Format
17
18* The first line is the title of the test.
19* Subsequent lines until a blank line contain HTML metadata.
20* Subsequent lines until a `===` line contains JS assertions.
21* Finally the WebVTT file. Special characters can be escaped using python3 escape sequences: `\x00`, `\r`.
22
23## Building Tests
24
25Requirements: Python 3.2 or newer
26
27```bash
28$ python3 tools/build.py
29```
30
31## Spec Coverage Report
32
33There is also a python implementation of the WebVTT file parser algorithm and a
34script to create a test coverage report of this implementation, under `tools/`.
35
36Requirements:
37* Python 3.2 or newer
38* [Coverage.py](https://pypi.python.org/pypi/coverage)
39
40Installing Coverage.py using [pip](https://pypi.python.org/pypi/pip).
41
42```bash
43$ pip3 install coverage
44```
45
46Generating the report:
47
48```bash
49$ python3 spec_report.py
50```
51
52Will output `report.html`.
53