diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 11:35:01 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 11:35:01 +0200 |
| commit | 717a6c2032d0df3669333dd52f993e8f84563bc2 (patch) | |
| tree | 7640e0b959ee944db8631a3b7d4d6188cec99007 /templates/dune | |
| parent | 18c60c3d0ad273374410dcc0118d82493f90da98 (diff) | |
| download | colitur-717a6c2032d0df3669333dd52f993e8f84563bc2.tar.gz colitur-717a6c2032d0df3669333dd52f993e8f84563bc2.zip | |
test(emit): replace two vacuous CSV/XML assertions with real ones
The live-data CSV assertion inspected only the first field's length,
always the 10-char ISO date, which can never contain a comma -- it could
not fail no matter what emit_csv.ml did with the rest of the row.
Mutation-proved: replacing emit_csv.ml's escape_field call with identity
left every test green while the real output emitted a 14-field row
against a 13-column header. Fixed by parsing the row as RFC 4180 actually
requires (a small quote-aware splitter) and asserting the field count
matches the header, plus asserting the quoted substring appears literally.
The XML suite asserted Escape.Xml's correctness in isolation but never
that emit_xml.ml actually calls it on every interpolated value. Bypassing
one escape call at the name-element site left all tests green while real
2035 output (Sts. Fabian & Sebastian, 20 January) emitted a bare '&' that
xmllint rejects. Fixed by adding a live-data test against the 2035 fixture
asserting an escaped ampersand is present and no bare one remains.
Both new assertions were run against their named mutations and confirmed
to redden before being reverted.
Diffstat (limited to 'templates/dune')
0 files changed, 0 insertions, 0 deletions
