Repository Public Research preview
1# Test fixtures23All workbooks here are synthetic: a five-year margin model invented for the tests.45| File | Written by | Purpose |6|---|---|---|7| `clean.xlsx`, `reference.xlsx` | `make-fixtures.mjs` | A sound model: Inputs, Calc, Outputs, Controls, Doc. No finding expected. |8| `defects.xlsx` | `make-fixtures.mjs` | Planted defects: typed constant at `Calc!D3`, broken pattern and buried constant at `Calc!E4`, `#REF!` at `Outputs!B4`, `#DIV/0!` at `Outputs!B6` propagating to `B7`, circular reference `Calc!B9` / `B10`, failing control `Controls!E5`. |9| `stale.xlsx` | `make-fixtures.mjs` | One stored result (`Outputs!B5`) that does not follow from its formula. |10| `nocache.xlsx` | `make-fixtures.mjs` | The clean model without any stored result, as a non-calculating library writes it. |11| `submission.xlsx` | `make-fixtures.mjs` | A student answer to `reference.xlsx`: typed units, one equivalent formula, wrong costs, errors carried forward, one missing output, one scale error. |12| `features.xlsx` | `make-fixtures.mjs` | Reader coverage: shared strings with rich text, shared formulas, number formats, hidden sheet, quoted sheet name, sheet-scoped name, whole-column and whole-row references. |13| `clean-libreoffice.xlsx` | LibreOffice | `nocache.xlsx` opened and saved by LibreOffice, which computed the stored results. An external check of the evaluator. |1415`make-fixtures.mjs` uses `xlsx-writer.mjs`, a minimal deterministic writer that stores a result16next to each formula. Those results are computed in the generator with plain JavaScript17arithmetic, not with the audit engine, so recalculation tests compare two independent18computations. A test asserts the committed files equal the generator's output.1920Rebuild:2122```bash23node test/fixtures/make-fixtures.mjs24# only when the clean model changes:25soffice --headless --convert-to xlsx --outdir /tmp/lo test/fixtures/nocache.xlsx26cp /tmp/lo/nocache.xlsx test/fixtures/clean-libreoffice.xlsx27```2829Hostile files (malformed archives, decompression bombs, path-traversal entry names) are built in30memory by the tests and never committed.31