aboutsummaryrefslogtreecommitdiff
path: root/internal/bible/bible_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/bible/bible_test.go')
-rw-r--r--internal/bible/bible_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/bible/bible_test.go b/internal/bible/bible_test.go
index 36223a3..a363d4d 100644
--- a/internal/bible/bible_test.go
+++ b/internal/bible/bible_test.go
@@ -29,6 +29,17 @@ func TestVerses(t *testing.T) {
func hasPrefix(s, p string) bool { return len(s) >= len(p) && s[:len(p)] == p }
+// TestVul2Kings guards the corpus fix: 2 Kings was mislabeled "2 King" in the
+// Vulgate TSV, so bible.Verses("vul","2 Kings",...) returned nothing.
+func TestVul2Kings(t *testing.T) {
+ if got := Verses("vul", "2 Kings", 1); len(got) == 0 {
+ t.Error("vul 2 Kings ch.1 has no verses (corpus mislabel regression)")
+ }
+ if got := Verses("vul", "2 King", 1); len(got) != 0 {
+ t.Error(`vul should no longer key the book as "2 King"`)
+ }
+}
+
func TestChapters(t *testing.T) {
ch := Chapters("wuj", "John")
if len(ch) == 0 || ch[0] != 1 {