mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:15:07 +00:00
test: fix update and cache cleanup cases
This commit is contained in:
@@ -177,7 +177,8 @@ EOF
|
|||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"Next.js build cache"* ]]
|
[[ "$output" == *"Next.js build cache"* ]]
|
||||||
grep -q -- "-P $HOME/CustomProjects " "$find_log"
|
grep -q -- "-P $HOME/CustomProjects " "$find_log"
|
||||||
! grep -q -- "-P $HOME " "$find_log"
|
run grep -q -- "-P $HOME " "$find_log"
|
||||||
|
[ "$status" -eq 1 ]
|
||||||
|
|
||||||
rm -rf "$HOME/CustomProjects" "$HOME/.config/mole" "$fake_bin" "$find_log"
|
rm -rf "$HOME/CustomProjects" "$HOME/.config/mole" "$fake_bin" "$find_log"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ EOF
|
|||||||
@test "get_homebrew_latest_version prefers brew outdated verbose target version" {
|
@test "get_homebrew_latest_version prefers brew outdated verbose target version" {
|
||||||
run bash --noprofile --norc <<'EOF'
|
run bash --noprofile --norc <<'EOF'
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
MOLE_SKIP_MAIN=1 source "$PROJECT_ROOT/mole"
|
MOLE_TEST_MODE=1 MOLE_SKIP_MAIN=1 source "$PROJECT_ROOT/mole"
|
||||||
|
|
||||||
brew() {
|
brew() {
|
||||||
if [[ "${1:-}" == "outdated" ]]; then
|
if [[ "${1:-}" == "outdated" ]]; then
|
||||||
@@ -625,7 +625,7 @@ EOF
|
|||||||
@test "get_homebrew_latest_version parses brew info fallback with heading prefix" {
|
@test "get_homebrew_latest_version parses brew info fallback with heading prefix" {
|
||||||
run bash --noprofile --norc <<'EOF'
|
run bash --noprofile --norc <<'EOF'
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
MOLE_SKIP_MAIN=1 source "$PROJECT_ROOT/mole"
|
MOLE_TEST_MODE=1 MOLE_SKIP_MAIN=1 source "$PROJECT_ROOT/mole"
|
||||||
|
|
||||||
brew() {
|
brew() {
|
||||||
if [[ "${1:-}" == "outdated" ]]; then
|
if [[ "${1:-}" == "outdated" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user