<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lectio.git/internal/bible/crosschapter_test.go, branch v0.45.1</title>
<subtitle>offline Catholic daily readings and liturgical calendar in Go, with CLI, TUI and web clients</subtitle>
<id>https://git.labunix.xyz/lectio.git/atom?h=v0.45.1</id>
<link rel='self' href='https://git.labunix.xyz/lectio.git/atom?h=v0.45.1'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/'/>
<updated>2026-07-29T09:46:17Z</updated>
<entry>
<title>test(bible): skip corpus-dependent tests when optional corpora aren't embedded</title>
<updated>2026-07-29T09:46:17Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-29T09:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=8ddd910dd545c45a7227da87ca125758b4a0e2cb'/>
<id>urn:sha1:8ddd910dd545c45a7227da87ca125758b4a0e2cb</id>
<content type='text'>
Since 51c0f4e split the corpora (only vul embedded by default; wuj/drb/grb
behind -tags fullbible), `go test ./...` on the default build was red across six
packages -- every failure was a test assuming an optional corpus is present.

Guard those assertions with a skip keyed on bible.Meta(code), so they run under
-tags fullbible and skip -- not fail -- on the default vul-only build. Mixed
tests are split into subtests so the always-embedded vul assertions and pure
logic (pl-&gt;vul fallback, explicit passthrough, bt-rejection, i18n labels) keep
running on both builds. Test-only change; no product code or corpora touched.

- internal/bible: TestVerses, TestLookup, TestCorpusBooks, TestChapters,
  TestGrbNoApparatusMarkers, TestCrossChapterRange* (requireCorpus helper).
- internal/cli, config, render, tui, web: the same pattern for their
  corpus-dependent tests.
- Fixes an index-out-of-range panic in internal/tui's reader tests that was
  aborting the package binary and masking 3 further corpus-absence failures
  (TestReaderBookmarkFlow, TestReaderChapterJump, TestReaderRemembersPlace).

Verified: `go test ./...` and `go test -tags fullbible ./...` both green (0 FAIL);
guards active only on the default build (29 skips vs 1 unrelated pre-existing);
gofmt and go vet clean.
</content>
</entry>
<entry>
<title>feat(bible): resolve and display cross-chapter verse ranges (N:M-P:Q)</title>
<updated>2026-07-27T21:54:29Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-27T21:54:29Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=2f20d41921a4ed08d0a7b16246215e0eee5ac512'/>
<id>urn:sha1:2f20d41921a4ed08d0a7b16246215e0eee5ac512</id>
<content type='text'>
Lookup now detects a verse-tail range that crosses a chapter boundary
("M-P:Q", e.g. "30-28:7" in "Sirach 27:30-28:7") and fetches chapter N
from verse M to its end, any whole chapters between, and chapter P from
verse 1 through Q, instead of misreading the tail as a plain from-to
range and coming up empty. SplitRef expands the same pattern inside a
comma list so a trailing group after the jump (e.g. the ",8-10" in
"Malachi 1:14-2:2,8-10") resolves against the new current chapter.
FormatRef renders the range intact as "&lt;sigla&gt; N:M-P:Q" instead of
splitting off a fake new-chapter marker from the embedded "P:" and
mangling the display (previously "Sir 27:7").

No sentinel value is ever stored in a ref string; it only bounds an
internal verse-filter loop in Lookup.
</content>
</entry>
</feed>
