1This file generates tests for markdown-it rust library. It gets one argument
2(file name) and edits that file in-place, replacing special markers inside
3with tests generated from fixtures.
4
5Run it like this from tests/ folder:
6```sh
7for I in *.rs ; do deno run --allow-read --allow-write ./fixtures/testgen.js $I ; done
8```
9
10As an example, it replaces this:
11```rs
12///////////////////////////////////////////////////////////////////////////
13// TESTGEN: fixtures/commonmark/spec.txt
14... any content here ...
15///////////////////////////////////////////////////////////////////////////
16```
17
18With approximately this:
19```rs
20///////////////////////////////////////////////////////////////////////////
21// TESTGEN: fixtures/commonmark/spec.txt
22#[test]
23fn line_123() {
24 run("*foo*", "<em>foo</em>");
25}
26... more tests here ...
27///////////////////////////////////////////////////////////////////////////
28```