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:
@@ -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 ]
|
||||
|
||||
Reference in New Issue
Block a user