1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 16:45:07 +00:00

fix: keep tealdeer tldr pages cache

This commit is contained in:
Tw93
2026-03-19 00:24:17 +08:00
parent 88521a14c2
commit 06d2a3d029
3 changed files with 18 additions and 0 deletions

View File

@@ -130,3 +130,19 @@ setup() {
fi
[ "$status" -eq 0 ]
}
@test "default whitelist protects tealdeer cache parent for tldr pages" {
local status
if HOME="$HOME" bash --noprofile --norc -c "
source '$PROJECT_ROOT/lib/manage/whitelist.sh'
rm -f \"\$HOME/.config/mole/whitelist\"
load_whitelist
WHITELIST_PATTERNS=(\"\${CURRENT_WHITELIST_PATTERNS[@]}\")
is_path_whitelisted \"\$HOME/Library/Caches/tealdeer\"
"; then
status=0
else
status=$?
fi
[ "$status" -eq 0 ]
}