diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 12:26:23 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-24 12:26:23 +0200 |
| commit | ed34fd574b4fc2e0a52c655ececddd1be29b271e (patch) | |
| tree | 8980a2b86ec279289abcabe3a691fa8a2a925765 /internal/bible/bible_test.go | |
| parent | a26fed000ad9f292618f9cecfd2b505dddfd004a (diff) | |
| download | lectio-ed34fd574b4fc2e0a52c655ececddd1be29b271e.tar.gz lectio-ed34fd574b4fc2e0a52c655ececddd1be29b271e.zip | |
reader: lectio-ui --reader fuzzy book picker + chapter reader over the corpora; v0.8.0
Diffstat (limited to 'internal/bible/bible_test.go')
| -rw-r--r-- | internal/bible/bible_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/bible/bible_test.go b/internal/bible/bible_test.go index efd22d6..36223a3 100644 --- a/internal/bible/bible_test.go +++ b/internal/bible/bible_test.go @@ -28,3 +28,19 @@ func TestVerses(t *testing.T) { } func hasPrefix(s, p string) bool { return len(s) >= len(p) && s[:len(p)] == p } + +func TestChapters(t *testing.T) { + ch := Chapters("wuj", "John") + if len(ch) == 0 || ch[0] != 1 { + t.Fatalf("John chapters = %v", ch) + } + for i := 1; i < len(ch); i++ { + if ch[i] <= ch[i-1] { + t.Errorf("chapters not sorted ascending: %v", ch) + break + } + } + if got := Chapters("wuj", "Nonesuch"); len(got) != 0 { + t.Errorf("missing book chapters = %v want empty", got) + } +} |
