aboutsummaryrefslogtreecommitdiff
path: root/internal/bible/corpusmeta_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 18:01:33 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 18:01:33 +0200
commit5e1664b8008675177a551aff1de371f54d4e20e4 (patch)
treeffe405e1e2767890e473f75f474d2781af683f1b /internal/bible/corpusmeta_test.go
parentf7344bb3de2885323a785bdc8d087bc034407fc4 (diff)
downloadlectio-5e1664b8008675177a551aff1de371f54d4e20e4.tar.gz
lectio-5e1664b8008675177a551aff1de371f54d4e20e4.zip
bible: embed only the Vulgate by default; other corpora opt-in
Split the bundled corpora so the default binary carries only the public-domain Latin Vulgate. wuj/drb/grb move to corpora_optional/ and are compiled in only with `-tags fullbible`, or dropped into the user corpora dir at runtime. This keeps the distributed AGPL binary free of third-party scripture text -- bible corpora are not covered by lectio's licence. - bible: read corpus files/metadata from core + optional embed FS (embReadCorpus/embCorpusFiles); optionalFS is set only under the tag. - config: default `versions` now reflects corpora actually available in the build (Vulgate first), so a vul-only binary offers no absent versions. - Makefile: `make build` = vul only; `make build-full` embeds the rest; `make test` runs with -tags fullbible; check-corpora validates both dirs. - tests: corpusmeta asserts on vul (the always-embedded corpus); the versions-default expectation follows availableVersions().
Diffstat (limited to 'internal/bible/corpusmeta_test.go')
-rw-r--r--internal/bible/corpusmeta_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/bible/corpusmeta_test.go b/internal/bible/corpusmeta_test.go
index 2a089bd..123f2dd 100644
--- a/internal/bible/corpusmeta_test.go
+++ b/internal/bible/corpusmeta_test.go
@@ -3,11 +3,13 @@ package bible
import "testing"
func TestEmbeddedCorpusMeta(t *testing.T) {
- m, ok := embeddedCorpusMeta("drb")
+ // vul is the only corpus embedded in the default (no-tag) build, so it is
+ // the sidecar we can assert on unconditionally.
+ m, ok := embeddedCorpusMeta("vul")
if !ok {
- t.Fatal("drb sidecar not found")
+ t.Fatal("vul sidecar not found")
}
- if m.Lang != "en" || m.PsalmSystem != "drb" || m.Name == "" {
- t.Fatalf("bad drb meta: %+v", m)
+ if m.Lang != "la" || m.PsalmSystem != "vulgate" || m.Name == "" {
+ t.Fatalf("bad vul meta: %+v", m)
}
}