Close the 3 real remaining coverage gaps

- vault_index.sh: grep fallback for frontmatter tag extraction when rg
  is unavailable (had this for vault_search.sh/vault_backlinks.sh, not
  vault_index.sh).
- git_cmd.bats: registered repo path that's a file, not a directory
  (had the obsidian equivalent, not git-manager's).
- git_cmd.bats: missing python3 in resolve_repo_path (previously only
  tested via setup.sh/vault_index.sh, not git_cmd.sh's own _lib.sh).

76 tests now (was 73). kcov: 87.84% (260/296 lines), up from 86.15% --
both target files (vault_index.sh, git-manager _lib.sh) now at 100%.
Remaining gap is entirely kcov's inability to trace multi-line
python3/awk/jq blocks and bash 'case pattern) ;;' no-op branches,
confirmed by checking hit counts on the surrounding lines -- not
further closeable by adding tests.
This commit is contained in:
Henner M. Kruse
2026-08-05 04:31:06 +00:00
parent dc4a5c5b5e
commit 06bd74d64f
2 changed files with 26 additions and 0 deletions
+9
View File
@@ -34,6 +34,15 @@ setup() {
done
}
@test "grep fallback still extracts tags when rg is unavailable" {
hide_command rg
run "$SCRIPT" v
[ "$status" -eq 0 ]
for tag in dns homelab networking overview; do
[[ "$output" == *"$tag"* ]]
done
}
@test "a note matching *overview* is flagged as a possible MOC file" {
run "$SCRIPT" v
[ "$status" -eq 0 ]