From 343a675a5a779cfce5a3dec9a3ad4a6ffb22de75 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 23 Jul 2026 12:55:24 +0200 Subject: bible: Polish citation -> English ref (with psalm versification) --- internal/bible/convert_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/bible/convert_test.go (limited to 'internal/bible/convert_test.go') diff --git a/internal/bible/convert_test.go b/internal/bible/convert_test.go new file mode 100644 index 0000000..6f16c89 --- /dev/null +++ b/internal/bible/convert_test.go @@ -0,0 +1,19 @@ +package bible + +import "testing" + +func TestToEnglishRef(t *testing.T) { + cases := []struct{ in, system, want string }{ + {"Mt 7, 1-5", "vulgate", "Mat 7:1-5"}, + {"J 20, 1. 11-18", "vulgate", "John 20:1,11-18"}, + {"por. J 20, 11", "vulgate", "John 20:11"}, + {"Ps 63 (62), 2. 3-4. 5-6. 8-9 (R.: por. 2ab)", "vulgate", "Psalms 62:2,3-4,5-6,8-9"}, + {"Ps 63 (62), 2. 3-4. 5-6. 8-9 (R.: por. 2ab)", "drb", "Psalms 63:1,2-3,4-5,7-8"}, + } + for _, c := range cases { + got, err := ToEnglishRef(c.in, c.system) + if err != nil || got != c.want { + t.Errorf("ToEnglishRef(%q,%q)=%q,%v want %q", c.in, c.system, got, err, c.want) + } + } +} -- cgit v1.3