Documentation
¶
Overview ¶
Command difftest looks for places where meyer and SQLite disagree.
The vendored corpus is what SQLite's own test suite happens to contain, which is overwhelmingly valid SQL: of 20,971 cases fewer than three hundred are rejections. Error fidelity — the exact message, at the exact byte — is therefore barely exercised by it. difftest fills that gap by mutating corpus SQL into inputs nobody wrote on purpose, and checking that meyer and the pinned SQLite build still reach the same verdict.
For every mutation both parsers are asked, and the two must agree on:
- accept versus reject, using the same derivation the test harness uses (a syntax-family message means reject; a semantic one means the statement parsed);
- the exact message text on rejection;
- the byte offset, wherever sqlite3_error_offset reported one.
A disagreement is a bug in meyer, and the tool prints a reproducer.
Usage:
go run ./cmd/difftest # sweep the whole corpus go run ./cmd/difftest -files select1,expr # a few files go run ./cmd/difftest -per 200 -seed 7 # dig harder, reproducibly
Click to show internal directories.
Click to hide internal directories.