1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 07:59:16 +00:00

Merge branch 'dev'

This commit is contained in:
Tw93
2026-01-12 17:50:07 +08:00
13 changed files with 353 additions and 134 deletions

View File

@@ -126,7 +126,6 @@ tmutil() {
start_section_spinner(){ :; }
stop_section_spinner(){ :; }
tm_is_running(){ return 1; }
tm_snapshots_mounted(){ return 1; }
DRY_RUN="false"
clean_local_snapshots
@@ -157,7 +156,6 @@ start_section_spinner(){ :; }
stop_section_spinner(){ :; }
note_activity(){ :; }
tm_is_running(){ return 1; }
tm_snapshots_mounted(){ return 1; }
DRY_RUN="true"
clean_local_snapshots
@@ -193,7 +191,6 @@ start_section_spinner(){ :; }
stop_section_spinner(){ :; }
note_activity(){ :; }
tm_is_running(){ return 1; }
tm_snapshots_mounted(){ return 1; }
unset -f read_key

View File

@@ -101,6 +101,27 @@ setup() {
[[ "$result" == "2" ]]
}
@test "filter_nested_artifacts: removes Xcode build subdirectories (Mac projects)" {
# Simulate Mac Xcode project with nested .build directories:
# ~/www/testapp/build
# ~/www/testapp/build/Framework.build
# ~/www/testapp/build/Package.build
mkdir -p "$HOME/www/testapp/build/Framework.build"
mkdir -p "$HOME/www/testapp/build/Package.build"
result=$(bash -c "
source '$PROJECT_ROOT/lib/clean/project.sh'
printf '%s\n' \
'$HOME/www/testapp/build' \
'$HOME/www/testapp/build/Framework.build' \
'$HOME/www/testapp/build/Package.build' | \
filter_nested_artifacts | wc -l | tr -d ' '
")
# Should only keep the top-level 'build' directory, filtering out nested .build dirs
[[ "$result" == "1" ]]
}
# Vendor protection unit tests
@test "is_rails_project_root: detects valid Rails project" {
mkdir -p "$HOME/www/test-rails/config"