Tests now cover Jude 5, 6, and Obadiah 5.
This commit is contained in:
parent
d970aeba19
commit
1976078492
1 changed files with 18 additions and 3 deletions
|
|
@ -12,8 +12,9 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Jude5 string = `Although you are fully aware of this, I want to remind you that after Jesus had delivered His people out of the land of Egypt, He destroyed those who did not believe.`
|
||||
Jude6 string = `And the angels who did not stay within their own domain but abandoned their proper dwelling—these He has kept in eternal chains under darkness, bound for judgment on that great day.`
|
||||
Jude5 string = `Although you are fully aware of this, I want to remind you that after Jesus had delivered His people out of the land of Egypt, He destroyed those who did not believe.`
|
||||
Jude6 string = `And the angels who did not stay within their own domain but abandoned their proper dwelling—these He has kept in eternal chains under darkness, bound for judgment on that great day.`
|
||||
Obadiah5 string = `“If thieves came to you, if robbers by night—oh, how you will be ruined—would they not steal only what they wanted? If grape gatherers came to you, would they not leave some gleanings?`
|
||||
)
|
||||
|
||||
func loadScripture(s string) (*bible.Chapter, error) {
|
||||
|
|
@ -60,6 +61,20 @@ func Test_ChapterJSON(t *testing.T) {
|
|||
if vv.String() != Jude6 {
|
||||
t.Error("Jude 6 did not match as expected:", vv.String())
|
||||
}
|
||||
|
||||
testJSON = &bytes.Buffer{}
|
||||
testJSON.WriteString(`{"numberOfVerses": 21, "chapter": {"number": 1, "content": [{"type": "verse", "number": 5, "content": [{"text": "\u201cIf thieves came to you,", "poem": 1}, {"text": "if robbers by night\u2014", "poem": 2}, {"text": "oh, how you will be ruined\u2014", "poem": 1}, {"text": "would they not steal only what they wanted?", "poem": 2}, {"text": "If grape gatherers came to you,", "poem": 1}, {"text": "would they not leave some gleanings?", "poem": 2}]}]}}`)
|
||||
|
||||
c = &bible.Chapter{}
|
||||
if err := json.Unmarshal(testJSON.Bytes(), c); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
vv = c.FilterVerses(5, 5)
|
||||
vv.SkipLineBreaks = true
|
||||
if vv.String() != Obadiah5 {
|
||||
t.Error("Obadiah 5 did not match as expected:", vv.String())
|
||||
}
|
||||
}
|
||||
|
||||
func Test_VerseFilter(t *testing.T) {
|
||||
|
|
@ -143,7 +158,7 @@ func Test_Bible_Reference(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
verses, err := bible.Reference("jude 5")
|
||||
verses, err := bible.Reference("obd 5")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue