diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 14:02:49 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 14:02:49 +0200 |
| commit | 78825639eab3c84d84a60fbd1f1781bcfa332044 (patch) | |
| tree | 75135a3e67d263a048470198e12e4573dc59e63a /internal/cli/liturgy_test.go | |
| parent | 58b748340059a02e696f6a7168f81114ac0f99e9 (diff) | |
| download | lectio-78825639eab3c84d84a60fbd1f1781bcfa332044.tar.gz lectio-78825639eab3c84d84a60fbd1f1781bcfa332044.zip | |
feat(caldata,cli): embed 1962 EF calendar + form-aware Stack; --liturgy computes EF
caldata.Tridentine()/Base(form); Stack(form,dir,use); runLiturgy drops the EF
guard and uses the form's base; rankLabel shows I-IV class; display omits OF
cycles + strips ef- slug prefix for EF.
Diffstat (limited to 'internal/cli/liturgy_test.go')
| -rw-r--r-- | internal/cli/liturgy_test.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/internal/cli/liturgy_test.go b/internal/cli/liturgy_test.go index 02f02c4..c9d66a5 100644 --- a/internal/cli/liturgy_test.go +++ b/internal/cli/liturgy_test.go @@ -33,7 +33,7 @@ func TestRunLiturgy(t *testing.T) { } } -func TestRunLiturgyTraditionalGuarded(t *testing.T) { +func TestRunLiturgyTraditionalComputesEF(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) @@ -42,11 +42,16 @@ func TestRunLiturgyTraditionalGuarded(t *testing.T) { 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 code := runLiturgy(cfg, "2025-08-15", &buf, &buf); code != 0 { + t.Fatalf("EF compute failed (%d):\n%s", code, buf.String()) + } + out := buf.String() + // EF: Assumption is I class, and 2025-08-15 is in Time after Pentecost (not OF "ordinary"). + if !strings.Contains(out, "Assumption") || !strings.Contains(out, "I class") { + t.Errorf("expected EF Assumption (I class):\n%s", out) } - if !strings.Contains(strings.ToLower(buf.String()), "ordinary form") { - t.Errorf("expected an EF-not-implemented notice:\n%s", buf.String()) + if !strings.Contains(out, "time-after-pentecost") { + t.Errorf("expected EF season time-after-pentecost:\n%s", out) } } |
