1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-05 23:43:01 +00:00

feat: optimize clean operation performance by pre-expanding whitelist patterns, improving size calculation, and adapting parallel processing based on file types, alongside test suite enhancements.

This commit is contained in:
Tw93
2025-12-30 17:13:43 +08:00
parent 41ce597f02
commit 6c1fcd23d7
6 changed files with 207 additions and 86 deletions

View File

@@ -27,7 +27,7 @@ setup() {
}
@test "mo clean --debug creates debug log file" {
run env HOME="$HOME" MO_DEBUG=1 "$PROJECT_ROOT/mole" clean --dry-run
run env HOME="$HOME" MOLE_TEST_MODE=1 MO_DEBUG=1 "$PROJECT_ROOT/mole" clean --dry-run
[ "$status" -eq 0 ]
MOLE_OUTPUT="$output"
@@ -44,14 +44,14 @@ setup() {
}
@test "mo clean without debug does not show debug log path" {
run env HOME="$HOME" MO_DEBUG=0 "$PROJECT_ROOT/mole" clean --dry-run
run env HOME="$HOME" MOLE_TEST_MODE=1 MO_DEBUG=0 "$PROJECT_ROOT/mole" clean --dry-run
[ "$status" -eq 0 ]
[[ "$output" != *"Debug session log saved to"* ]]
}
@test "mo clean --debug logs system info" {
run env HOME="$HOME" MO_DEBUG=1 "$PROJECT_ROOT/mole" clean --dry-run
run env HOME="$HOME" MOLE_TEST_MODE=1 MO_DEBUG=1 "$PROJECT_ROOT/mole" clean --dry-run
[ "$status" -eq 0 ]
DEBUG_LOG="$HOME/.config/mole/mole_debug_session.log"