1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-11 14:44:04 +00:00

feat: implement empty Library directory cleanup and Android NDK version check.

This commit is contained in:
Tw93
2026-01-03 09:41:05 +08:00
parent a0be298bfc
commit f5a8adb97e
6 changed files with 55 additions and 20 deletions

View File

@@ -102,3 +102,19 @@ EOF
[ "$status" -eq 0 ]
}
@test "clean_empty_library_items only cleans empty dirs" {
run env HOME="$HOME" PROJECT_ROOT="$PROJECT_ROOT" /bin/bash --noprofile --norc <<'EOF'
set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/user.sh"
safe_clean() { echo "$2"; }
mkdir -p "$HOME/Library/EmptyDir"
touch "$HOME/Library/empty.txt"
clean_empty_library_items
EOF
[ "$status" -eq 0 ]
[[ "$output" == *"Empty Library folders"* ]]
[[ "$output" != *"Empty Library files"* ]]
}