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

Improve update checks and cleanup UX, add timeout regressions

This commit is contained in:
tw93
2026-03-05 12:00:07 +08:00
parent fbee8da9f7
commit 8e4b8a5e0d
21 changed files with 948 additions and 164 deletions

View File

@@ -299,3 +299,27 @@ EOF
[[ "$output" == *"$volumes_root/unused-runtime"* ]]
[[ "$output" != *"$volumes_root/in-use-runtime"* ]]
}
@test "clean_dev_mobile continues cleanup when simctl is unavailable" {
run env HOME="$HOME" PROJECT_ROOT="$PROJECT_ROOT" bash --noprofile --norc <<'EOF'
set -euo pipefail
source "$PROJECT_ROOT/lib/core/common.sh"
source "$PROJECT_ROOT/lib/clean/dev.sh"
check_android_ndk() { :; }
clean_xcode_documentation_cache() { :; }
clean_xcode_simulator_runtime_volumes() { :; }
clean_xcode_device_support() { echo "DEVICE_SUPPORT:$2"; }
safe_clean() { echo "SAFE_CLEAN:$2"; }
note_activity() { :; }
debug_log() { :; }
xcrun() { return 1; }
clean_dev_mobile
EOF
[ "$status" -eq 0 ]
[[ "$output" == *"simctl not available"* ]]
[[ "$output" == *"DEVICE_SUPPORT:iOS DeviceSupport"* ]]
[[ "$output" == *"SAFE_CLEAN:Android SDK cache"* ]]
}