Index: trunk/extensions/VisualEditor/tests/parser/README |
— | — | @@ -1,8 +1,10 @@ |
2 | 2 | Work in progress. :) |
3 | 3 | |
4 | | -Batch-testing tools loading the parsing code into node.js, and going through a MediaWiki XML export dump to run round-trip tests over it. Currently not much will succeed as there's bad handling of newlines. ;) |
| 4 | +Please see https://www.mediawiki.org/wiki/Future/Parser_development for some |
| 5 | +information on how to get started with these tests and the curren parser |
| 6 | +architecture. |
5 | 7 | |
6 | | -Need npm modules: |
| 8 | +Needed npm modules: |
7 | 9 | * pegjs |
8 | 10 | * colors |
9 | 11 | * html5 |
— | — | @@ -11,4 +13,26 @@ |
12 | 14 | * diff |
13 | 15 | * libxmljs (requires native compilation) |
14 | 16 | * optimist (for argument handling) |
15 | | -* webworker |
| 17 | +* webworker (not needed for parserTests) |
| 18 | + |
| 19 | +== Running parserTests.js == |
| 20 | + |
| 21 | +For parserTests, you also need MediaWiki's parser test cases (parserTests.txt) |
| 22 | +either in a phase3 checkout parallel to extensions (tried by default). You can |
| 23 | +also specify a test case file as an argument. |
| 24 | + |
| 25 | +Then, in this directory, try: |
| 26 | + |
| 27 | +node ./parserTests.js |
| 28 | + |
| 29 | +Several options are available for parserTests: |
| 30 | + |
| 31 | +node ./parserTests.js --help |
| 32 | + |
| 33 | +Enjoy! |
| 34 | + |
| 35 | +== Running roundtrip tests == |
| 36 | + |
| 37 | +Round-trip tests are not yet ported to the current parser architecture. The |
| 38 | +focus so far has been on parserTests and getting the parser architecture in |
| 39 | +shape, but we'll get back to round-trip tests eventually. |