aboutsummaryrefslogtreecommitdiff
path: root/test/test_colitur.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 11:35:01 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 11:35:01 +0200
commit717a6c2032d0df3669333dd52f993e8f84563bc2 (patch)
tree7640e0b959ee944db8631a3b7d4d6188cec99007 /test/test_colitur.ml
parent18c60c3d0ad273374410dcc0118d82493f90da98 (diff)
downloadcolitur-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 'test/test_colitur.ml')
0 files changed, 0 insertions, 0 deletions