1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-07 04:45:38 +00:00

feat: Improve clean command's regex handling and pnpm cache cleaning, enhance test output, update completion descriptions, and clarify installation instructions.

This commit is contained in:
Tw93
2026-01-02 18:50:42 +08:00
parent 09286f8ff9
commit 910e79df4e
5 changed files with 20 additions and 10 deletions

View File

@@ -94,8 +94,8 @@ setup() {
@test "completion zsh includes command descriptions" {
run "$PROJECT_ROOT/bin/completion.sh" zsh
[ "$status" -eq 0 ]
[[ "$output" == *"optimize:Free up disk space"* ]]
[[ "$output" == *"clean:Remove apps completely"* ]]
[[ "$output" == *"optimize:Check and maintain system"* ]]
[[ "$output" == *"clean:Free up disk space"* ]]
}
@test "completion fish generates valid fish script" {
@@ -115,6 +115,7 @@ setup() {
}
@test "completion auto-install detects zsh" {
# shellcheck disable=SC2030,SC2031
export SHELL=/bin/zsh
# Simulate auto-install (no interaction)
@@ -131,8 +132,10 @@ setup() {
}
@test "completion auto-install detects already installed" {
# shellcheck disable=SC2031
export SHELL=/bin/zsh
mkdir -p "$HOME"
# shellcheck disable=SC2016
echo 'eval "$(mole completion zsh)"' > "$HOME/.zshrc"
run "$PROJECT_ROOT/bin/completion.sh"