mirror of
https://github.com/tw93/Mole.git
synced 2026-02-09 00:54:22 +00:00
feat: implement empty Library directory cleanup and Android NDK version check.
This commit is contained in:
@@ -71,3 +71,10 @@ setup() {
|
||||
run bash -c "grep -q 'write_raycast_script' '$PROJECT_ROOT/scripts/setup-quick-launchers.sh'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "install.sh supports dev branch installs" {
|
||||
run bash -c "grep -q 'refs/heads/dev.tar.gz' '$PROJECT_ROOT/install.sh'"
|
||||
[ "$status" -eq 0 ]
|
||||
run bash -c "grep -q 'MOLE_VERSION=\"dev\"' '$PROJECT_ROOT/install.sh'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
dependency
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [[ "$1" == "status" ]]; then
|
||||
cat << 'TMUTIL_OUTPUT'
|
||||
Backup session status:
|
||||
{
|
||||
ClientID = "com.apple.backupd";
|
||||
Running = 1;
|
||||
}
|
||||
TMUTIL_OUTPUT
|
||||
elif [[ "$1" == "destinationinfo" ]]; then
|
||||
cat << 'DEST_OUTPUT'
|
||||
====================================================
|
||||
Name : TestBackup
|
||||
Kind : Local
|
||||
Mount Point : /Volumes/TestBackup
|
||||
ID : 12345678-1234-1234-1234-123456789012
|
||||
====================================================
|
||||
DEST_OUTPUT
|
||||
fi
|
||||
@@ -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"* ]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user