package tradlit import ( "os" "testing" ) func TestParse(t *testing.T) { body, err := os.ReadFile("testdata/2026-07-22.json") if err != nil { t.Fatal(err) } secs, err := Parse(body) if err != nil { t.Fatal(err) } var gospel, epistle bool for _, s := range secs { if s.PartID == "evangelium" { gospel = true if s.Citation != "Luke 7:36-50" { t.Errorf("gospel citation = %q", s.Citation) } if len(s.Paragraphs) == 0 { t.Error("gospel has no vernacular text") } } if s.PartID == "lectio" { epistle = true } } if !gospel || !epistle { t.Errorf("missing parts: gospel=%v epistle=%v", gospel, epistle) } }