#2052·prql

Add tests for syntax grammars

Author: max-sixtyCreated Mar 8, 2023Updated Sep 15, 2026
Labelshelp wantedtesting

On changing the case syntax, I realize that we didn't have syntax for the previous syntax of ->, let alone the update one of =>.

In tree-sitter-prql, there are tests on some small examples; for example https://github.com/PRQL/tree-sitter-prql/blob/5f6c4e4a90633b19e2077c1d37248989789d64be/test/corpus/from_text.txt. Could we do something similar for the ones in this repo?

This would both help improve the quality of the current grammars, and gate future syntax changes on updating these. Some options of how we could do this; in increasing order of completeness but also work:

  • Simply "do a couple of canonical examples successfully parse"
  • Whether the snapshot .prql files in the repo parse
  • Snapshots of parse outputs, like tree-sitter-prql have

Something initial, on a subset of the grammars, would be very welcome