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/caldata/stack_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/caldata/stack_test.go')
| -rw-r--r-- | internal/caldata/stack_test.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/internal/caldata/stack_test.go b/internal/caldata/stack_test.go index b9d5bfb..3c1cf3f 100644 --- a/internal/caldata/stack_test.go +++ b/internal/caldata/stack_test.go @@ -13,7 +13,7 @@ func TestStack(t *testing.T) { os.WriteFile(filepath.Join(dir, "krakow.ini"), []byte("[layer]\nid = krakow\ntype = diocesan\n\n[st-stanislaus]\ndate = 05-08\nrank = solemnity\nclass = saint\ncolour = red\nname.pl = Św. Stanisława\n"), 0o644) - layers, errs := Stack(dir, []string{"poland", "krakow"}) + layers, errs := Stack("new", dir, []string{"poland", "krakow"}) if len(errs) != 0 { t.Fatalf("unexpected errors: %v", errs) } @@ -32,7 +32,7 @@ func TestStackMissingLayerSkips(t *testing.T) { dir := t.TempDir() os.WriteFile(filepath.Join(dir, "good.ini"), []byte("[layer]\nid = good\n\n[x]\ndate = 01-02\nrank = memorial\nname.en = X\n"), 0o644) - layers, errs := Stack(dir, []string{"good", "missing"}) + layers, errs := Stack("new", dir, []string{"good", "missing"}) if len(errs) != 1 { t.Fatalf("want 1 error for the missing layer, got %v", errs) } @@ -54,3 +54,15 @@ func TestLoadLayerDefaultsIDToStem(t *testing.T) { t.Errorf("ID = %q, want myparish (from stem)", l.ID) } } + +func TestStackFormBase(t *testing.T) { + dir := t.TempDir() + efLayers, _ := Stack("old", dir, nil) + if efLayers[0].ID != "tridentine" { + t.Errorf("EF base = %q want tridentine", efLayers[0].ID) + } + ofLayers, _ := Stack("new", dir, nil) + if ofLayers[0].ID != "universal" { + t.Errorf("OF base = %q want universal", ofLayers[0].ID) + } +} |
