From 3a43b6199a518dd85c2607c6af47b1e3b5d4ae76 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 13:34:39 +0200 Subject: fix(cli): --liturgy signals EF-not-implemented instead of silently returning OF --- internal/cli/liturgy_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'internal/cli/liturgy_test.go') diff --git a/internal/cli/liturgy_test.go b/internal/cli/liturgy_test.go index c713703..02f02c4 100644 --- a/internal/cli/liturgy_test.go +++ b/internal/cli/liturgy_test.go @@ -33,6 +33,23 @@ func TestRunLiturgy(t *testing.T) { } } +func TestRunLiturgyTraditionalGuarded(t *testing.T) { + dir := t.TempDir() + t.Setenv("LECTIO_CONFIG", filepath.Join(dir, "config.ini")) + os.WriteFile(filepath.Join(dir, "config.ini"), []byte("lectionary = traditional\n"), 0o644) + cfg, err := config.Load() + if err != nil { + t.Fatal(err) + } + var buf bytes.Buffer + if code := runLiturgy(cfg, "2025-08-15", &buf, &buf); code == 0 { + t.Fatalf("traditional config should be guarded, not computed as OF:\n%s", buf.String()) + } + if !strings.Contains(strings.ToLower(buf.String()), "ordinary form") { + t.Errorf("expected an EF-not-implemented notice:\n%s", buf.String()) + } +} + func TestRunLiturgyUserLayer(t *testing.T) { dir := t.TempDir() t.Setenv("LECTIO_CONFIG", filepath.Join(dir, "config.ini")) -- cgit v1.3