aboutsummaryrefslogtreecommitdiff
path: root/internal/bible/bible_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 15:25:50 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-24 15:25:50 +0200
commited7717fef53db3b3aa5593fbb2649313e75a0f31 (patch)
tree023601285808a4704f5646bf6e4777beea6dd93a /internal/bible/bible_test.go
parent1e4939874a14d8abb13e82b2273bfc5f9d653295 (diff)
downloadlectio-ed7717fef53db3b3aa5593fbb2649313e75a0f31.tar.gz
lectio-ed7717fef53db3b3aa5593fbb2649313e75a0f31.zip
cli: --rand/--rand-v (random verse) + --rand-ch (random chapter) from the corpus, using the config default version; v0.16.0
Diffstat (limited to 'internal/bible/bible_test.go')
-rw-r--r--internal/bible/bible_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/bible/bible_test.go b/internal/bible/bible_test.go
index 804b8c4..71a2c89 100644
--- a/internal/bible/bible_test.go
+++ b/internal/bible/bible_test.go
@@ -52,6 +52,25 @@ func TestVul2Kings(t *testing.T) {
}
}
+func TestCorpusBooks(t *testing.T) {
+ books := CorpusBooks("wuj")
+ if len(books) == 0 {
+ t.Fatal("wuj corpus has no books")
+ }
+ found := false
+ for _, b := range books {
+ if b == "John" {
+ found = true
+ }
+ }
+ if !found {
+ t.Errorf("wuj CorpusBooks missing John")
+ }
+ if got := CorpusBooks("bt"); len(got) != 0 {
+ t.Errorf("bt has no corpus, got %d books", len(got))
+ }
+}
+
func TestChapters(t *testing.T) {
ch := Chapters("wuj", "John")
if len(ch) == 0 || ch[0] != 1 {