Debian Codegraph @

vendor/wikimedia/parsoid/tests/README.md

raw
1 Please see [the Parsoid project page](https://www.mediawiki.org/wiki/Parsoid)
2 for some information on how to get started with these tests and the current
3 parser architecture.
4
5 Install dependencies and run tests:
6
7 $ cd .. # if you are in this README file's directory
8 $ npm test
9
10 Running parserTests.js
11 ----------------------
12
13 For parserTests, you also need MediaWiki's parser test cases
14 (`parserTests.txt`). Parsoid maintains its own fork of the MediaWiki
15 parser test cases, and we synchronize it from time to time. You can
16 also specify a test case file as an argument, or symlink
17 `parserTests.txt` from a `mediawiki/core` git checkout.
18
19 $ node bin/parserTests.js
20
21 Several options are available for parserTests:
22
23 $ node bin/parserTests.js --help
24
25 Enjoy!
26
27 Running the dumpgrepper
28 -----------------------
29
30 The dumpgrepper utility is useful to search XML dumps for specific regexp
31 patterns. With a simple regexp, an enwiki dump can be grepped in ~20 minutes.
32
33 The grepper operates on actual wikitext (with XML encoding removed), so there is
34 no need to complicate regexps with entities. It supports JavaScript RegExps.
35
36 $ npm install -g dumpgrepper
37
38 More information on [github](https://github.com/wikimedia/dumpgrepper) and the
39 [mediawiki wiki](https://www.mediawiki.org/wiki/Parsoid/DumpGrepper).