Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine corpus #16

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,12 @@ A tree-sitter grammar for Pkl.

# Tests

Tree sitter comes with its own test framework. Files in `corpus/`
describe one test each. All tests in `corpus/` are performed by the
Tree sitter comes with its own test framework. Files in `test/corpus/`
describe one test each. All tests in `test/corpus/` are performed by the
command

$ tree-sitter test

The script `src/synctests.ts` creates `corpus/` test files from tests in
`pkl`'s `LanguageSnippetTests`. The script assumes that `../pkl` is a
checked out `pkl` repository (and that the tests are under
`pkl-core/src/test/files/LanguageSnippetFiles/input`). A pre-condition
of the script is that `tree-sitter test` currently passes. If broken
tests need replacing, the broken tests must first be deleted.

It can be executed by running

$ npm run synctests

# Upgrading tree-sitter

Upgrading tree-sitter involves upgrading the NPM package.
Expand Down
168 changes: 0 additions & 168 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
"@types/node": "^20.4.5",
"node-gyp": "^9.1.0",
"tree-sitter-cli": "^0.22.6",
"ts-node": "^10.0.0",
"typescript": "^4.9.0"
},
"scripts": {
"build": "tree-sitter generate && node-gyp configure && node-gyp build",
"test": "tree-sitter test",
"synctests": "ts-node src/synctests.ts",
"getVersion": "node -p \"require('./package.json').version\"",
"gen-lib": "tree-sitter generate -b --libdir ."
},
Expand Down
47 changes: 0 additions & 47 deletions src/synctests.ts

This file was deleted.

Loading