summaryrefslogtreecommitdiff
path: root/internal/cli/cli_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:40:12 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:40:12 +0200
commit588d9fb64e023d08b3e6105b69c08d3f9ddf6083 (patch)
treec2144823d288c2d8d4e072ebfb3ecc58455fd192 /internal/cli/cli_test.go
parent2cf3c82d357663423b7f77ec20cdd03faca209fa (diff)
downloadlectio-588d9fb64e023d08b3e6105b69c08d3f9ddf6083.tar.gz
lectio-588d9fb64e023d08b3e6105b69c08d3f9ddf6083.zip
feat(cli): config-driven reading corpus + surface user corpora
Diffstat (limited to 'internal/cli/cli_test.go')
-rw-r--r--internal/cli/cli_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/cli/cli_test.go b/internal/cli/cli_test.go
index 3b99562..b08ffba 100644
--- a/internal/cli/cli_test.go
+++ b/internal/cli/cli_test.go
@@ -318,6 +318,20 @@ func TestListFlag(t *testing.T) {
}
}
+func TestListSurfacesUserCorpus(t *testing.T) {
+ bible.SetUserCorporaDir("../bible/testdata/corpora")
+ t.Cleanup(func() { bible.SetUserCorporaDir("") })
+
+ tbl, _ := bible.LoadBookTable(nil)
+ var out bytes.Buffer
+ if code := runList(tbl, "en", &out); code != 0 {
+ t.Fatalf("runList code=%d", code)
+ }
+ if s := out.String(); !strings.Contains(s, "good") || !strings.Contains(s, "Good Test Corpus") {
+ t.Errorf("--list did not surface the user fixture corpus:\n%s", s)
+ }
+}
+
func TestRefEnglishDialect(t *testing.T) {
var out, errb bytes.Buffer
if code := Run([]string{"-p", "Jn 3:16", "-b", "vul"}, nil, &out, &errb); code != 0 {