mirror of
https://github.com/tw93/Mole.git
synced 2026-02-09 08:29:20 +00:00
docs: add --debug flag documentation and update tests
- Add --dry-run --debug usage examples to README - Add detailed preview tip explaining debug log features - Update tests/clean_core.bats for debug functionality - Closes GitHub issue #242
This commit is contained in:
@@ -59,6 +59,20 @@ EOF
|
||||
[ -f "$HOME/Library/Caches/WhitelistedApp/data.tmp" ]
|
||||
}
|
||||
|
||||
@test "mo clean honors whitelist entries with $HOME literal" {
|
||||
mkdir -p "$HOME/Library/Caches/WhitelistedApp"
|
||||
echo "keep me" > "$HOME/Library/Caches/WhitelistedApp/data.tmp"
|
||||
|
||||
cat > "$HOME/.config/mole/whitelist" << 'EOF'
|
||||
$HOME/Library/Caches/WhitelistedApp*
|
||||
EOF
|
||||
|
||||
run env HOME="$HOME" MOLE_TEST_MODE=1 "$PROJECT_ROOT/mole" clean --dry-run
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"Protected"* ]]
|
||||
[ -f "$HOME/Library/Caches/WhitelistedApp/data.tmp" ]
|
||||
}
|
||||
|
||||
@test "mo clean protects Maven repository by default" {
|
||||
mkdir -p "$HOME/.m2/repository/org/example"
|
||||
echo "dependency" > "$HOME/.m2/repository/org/example/lib.jar"
|
||||
|
||||
Reference in New Issue
Block a user