1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 20:25:04 +00:00

Automated test synchronous update

This commit is contained in:
Tw93
2025-11-29 23:14:46 +09:00
parent a184094f45
commit 3f9d1205fd
10 changed files with 20 additions and 175 deletions

View File

@@ -177,24 +177,3 @@ setup() {
rm -rf "$HOME/projects"
}
# Test permission flag creation
@test "check_tcc_permissions creates permission flag after check" {
# Remove flag if exists
rm -f "$HOME/.cache/mole/permissions_granted"
# Simulate accessible Library/Caches (skip TCC dialog)
function ls() {
return 0 # Simulate accessible
}
export -f ls
run bash -c "
source '$PROJECT_ROOT/lib/common.sh'
source '$PROJECT_ROOT/lib/clean_caches.sh'
check_tcc_permissions < /dev/null
"
[ "$status" -eq 0 ]
# Permission flag should be created
[[ -f "$HOME/.cache/mole/permissions_granted" ]]
}