diff options
Diffstat (limited to 'test/test_names.ml')
| -rw-r--r-- | test/test_names.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_names.ml b/test/test_names.ml index 3ddf79c..1649f9e 100644 --- a/test/test_names.ml +++ b/test/test_names.ml @@ -130,7 +130,13 @@ let test_record () = (* A day outside a numbered week renders week as the empty string, not "0". *) let r' = Rec.of_temporal ~rite:"ef" demo_vocab date { t with Tmp.week = None } in Alcotest.(check string) "no week" "" r'.Rec.week; - Alcotest.(check int) "row matches headers" (List.length Rec.headers) + (* Schema is pinned: headers and to_row derive from a single columns list, + so alignment cannot drift. Assert the column names in order. *) + Alcotest.(check (list string)) "headers schema" + [ "date"; "rite"; "season"; "week"; "weekday"; "slug"; "rank"; "colour"; "subject" ] + Rec.headers; + (* Row must be the same length and order as headers. *) + Alcotest.(check int) "row matches headers length" (List.length Rec.headers) (List.length (Rec.to_row r)) let suite = |
