From 588d9fb64e023d08b3e6105b69c08d3f9ddf6083 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 20:40:12 +0200 Subject: feat(cli): config-driven reading corpus + surface user corpora --- internal/cli/cli_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal/cli/cli_test.go') 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 { -- cgit v1.3