@@ -120,8 +120,8 @@ A case is a directory holding the inputs and the expected output. `exec.json`
120120names the command and its arguments — omit it and the case runs ` generate ` ,
121121comparing the generated files against the ones committed alongside; give it
122122` {"command": "analyze", "args": [...]} ` and the case compares the command's
123- stdout against ` stdout.txt ` . A case that is expected to fail commits its
124- ` stderr.txt ` . Regenerate a golden by running the command in its directory and
123+ stdout against ` stdout.json ` (or ` stdout.txt ` for a command that does not
124+ print JSON). A case that is expected to fail commits its ` stderr.txt ` . Regenerate a golden by running the command in its directory and
125125writing the output back over the committed file.
126126
127127` TestReplay ` runs the whole corpus once per * context* . ` base ` runs each case as
@@ -147,8 +147,11 @@ the run early. Run a subset to get past one (`-run 'TestReplay/core/^select'`).
147147
148148The dialect seeds under ` /internal/engine/<engine>/dialect/ ` are generated
149149from a live database by ` /internal/goldeneye ` , a nested module, and its tests
150- verify the committed files against one byte for byte. Engines whose database
151- is not available skip.
150+ verify the committed files against one byte for byte. The same module checks
151+ the ` analyze_* ` cases under ` /internal/endtoend/testdata/ ` against what the
152+ database itself reports for them, so a ` fixture.sql ` next to a case's schema
153+ gives the queries rows to run against. Engines whose database is not
154+ available skip.
152155
153156``` bash
154157cd internal/goldeneye
@@ -240,8 +243,10 @@ MYSQL_SERVER_URI="root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatement
240243 JSONL read by ` /internal/core/seed ` ; the generated parts come from
241244 ` /internal/goldeneye `
242245- ` /internal/goldeneye/ ` - Nested module that generates the dialect seeds
243- under ` /internal/engine/<engine>/dialect/ ` from a live database and checks
244- the committed ones against it, one package per engine; see its README
246+ under ` /internal/engine/<engine>/dialect/ ` from a live database, checks
247+ the committed ones against it, and checks the analyze cases under
248+ ` /internal/endtoend/testdata/ ` against what the database reports, one
249+ package per engine; see its README
245250- ` /internal/core/ ` - The analysis core: catalog, analyzer and dialect seeds
246251- ` /internal/compiler/ ` - Query compilation logic
247252- ` /internal/codegen/ ` - Code generation for different languages
0 commit comments