Grammar tests test the grammars defined under the languages directory.
Current test coverage is:
- tlaplus-grammar.json
Grammar tests are defined under tests/suite/languages
A grammar test is a test file that includes annotation of the expected assigned scopes. One example is the tlaplus-grammar-test.tla.
For more information on how to write a test see vscode-tmgrammar-test.
To run from the command line:
npm run test:tlaplus-grammar
To run from VS Code:
- Open the project directory in VS Code.
- Switch to the Debug and Run panel.
- Select the "Run TLA Plus Grammar Tests" config.
After adding a new test file for a grammar test:
- Update the npm command to include that test file in package.json.
- Update launch.json to include an option to run the new test.