-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Co-Authored-By: ObserverOfTime <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,20 @@ jobs: | |
uses: tree-sitter/[email protected] | ||
with: | ||
node-version: ${{vars.NODE_VERSION}} | ||
- name: Check for scanner changes | ||
uses: tj-actions/changed-files@v42 | ||
id: scanner-check | ||
if: runner.os == 'Linux' | ||
with: | ||
files: src/scanner.c | ||
- name: Fuzz scanner | ||
uses: tree-sitter/fuzz-action@v4 | ||
if: steps.scanner-check.outputs.any_changed == 'true' | ||
with: | ||
corpus: examples | ||
- name: Run tests | ||
uses: tree-sitter/[email protected] | ||
with: | ||
test-library: ${{runner.os == 'Linux'}} | ||
corpus-files: examples/* | ||
invalid-files: examples/invalid.tst |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
========================= | ||
Test that will be skipped | ||
:skip | ||
========================= | ||
|
||
int main() {} | ||
|
||
------------------------- | ||
|
||
==================================== | ||
Test that will run on Linux or macOS | ||
|
||
:platform(linux) | ||
:platform(macos) | ||
==================================== | ||
|
||
int main() {} | ||
|
||
------------------------------------ | ||
|
||
======================================================================== | ||
Test that expects an error, and will fail fast if there's no parse error | ||
:fail-fast | ||
:error | ||
======================================================================== | ||
|
||
int main ( {} | ||
|
||
------------------------------------------------------------------------ | ||
|
||
================================================= | ||
Test that will parse with both Typescript and TSX | ||
:language(typescript) | ||
:language(tsx) | ||
================================================= | ||
|
||
console.log('Hello, world!'); | ||
|
||
------------------------------------------------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
==================||| | ||
Invalid suffix | ||
==================||| | ||
|
||
foo | ||
|
||
---|| | ||
|
||
(foo) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
================== | ||
Return statements | ||
================== | ||
|
||
func x() int { | ||
return 1; | ||
} | ||
|
||
--- | ||
|
||
(source_file | ||
(function_definition | ||
(identifier) | ||
(parameter_list) | ||
(primitive_type) | ||
(block | ||
(return_statement (number))))) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
==================||| | ||
Basic module | ||
==================||| | ||
|
||
---- MODULE Test ---- | ||
increment(n) == n + 1 | ||
==== | ||
|
||
---||| | ||
|
||
(source_file | ||
(module (identifier) | ||
(operator (identifier) | ||
(parameter_list (identifier)) | ||
(plus (identifier_ref) (number))))) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.