mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:41:46 +00:00
feat(uninstall): add support for third-party input methods
- Add '/Library/Input Methods' to application scan paths - Unprotect Sogou, QQ, and Baidu input methods from system critical list - Enhance file cleanup logic to detect input method plugins and caches - Allow clean uninstallation and deep cleaning of WeType, Sogou, etc.
This commit is contained in:
@@ -146,6 +146,20 @@ EOF
|
||||
[ "$result" = "not-protected" ]
|
||||
}
|
||||
|
||||
@test "input methods are protected during cleanup but allowed for uninstall" {
|
||||
result=$(HOME="$HOME" bash --noprofile --norc -c "source '$PROJECT_ROOT/lib/core/common.sh'; should_protect_data 'com.tencent.inputmethod.QQInput' && echo 'protected' || echo 'not-protected'")
|
||||
[ "$result" = "protected" ]
|
||||
|
||||
result=$(HOME="$HOME" bash --noprofile --norc -c "source '$PROJECT_ROOT/lib/core/common.sh'; should_protect_data 'com.sogou.inputmethod.pinyin' && echo 'protected' || echo 'not-protected'")
|
||||
[ "$result" = "protected" ]
|
||||
|
||||
result=$(HOME="$HOME" bash --noprofile --norc -c "source '$PROJECT_ROOT/lib/core/common.sh'; should_protect_from_uninstall 'com.tencent.inputmethod.QQInput' && echo 'protected' || echo 'not-protected'")
|
||||
[ "$result" = "not-protected" ]
|
||||
|
||||
result=$(HOME="$HOME" bash --noprofile --norc -c "source '$PROJECT_ROOT/lib/core/common.sh'; should_protect_from_uninstall 'com.apple.inputmethod.SCIM' && echo 'protected' || echo 'not-protected'")
|
||||
[ "$result" = "protected" ]
|
||||
}
|
||||
|
||||
@test "print_summary_block formats output correctly" {
|
||||
result=$(HOME="$HOME" bash --noprofile --norc -c "source '$PROJECT_ROOT/lib/core/common.sh'; print_summary_block 'success' 'Test Summary' 'Detail 1' 'Detail 2'")
|
||||
[[ "$result" == *"Test Summary"* ]]
|
||||
|
||||
Reference in New Issue
Block a user