mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 11:31:46 +00:00
Fix the issue with automated testing
This commit is contained in:
@@ -123,28 +123,28 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "check_android_ndk reports multiple NDK versions" {
|
@test "check_android_ndk reports multiple NDK versions" {
|
||||||
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/Library/Android/sdk/ndk"/{21.0.1,22.0.0,20.0.0} && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_WARNING="●" && check_android_ndk' "$PROJECT_ROOT/lib/clean/dev.sh"
|
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/Library/Android/sdk/ndk"/{21.0.1,22.0.0,20.0.0} && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_SUCCESS="✓" && check_android_ndk' "$PROJECT_ROOT/lib/clean/dev.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"Android NDK versions: 3 found"* ]]
|
[[ "$output" == *"Android NDK versions: 3 found"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "check_android_ndk silent when only one NDK" {
|
@test "check_android_ndk silent when only one NDK" {
|
||||||
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/Library/Android/sdk/ndk/22.0.0" && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_WARNING="●" && check_android_ndk' "$PROJECT_ROOT/lib/clean/dev.sh"
|
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/Library/Android/sdk/ndk/22.0.0" && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_SUCCESS="✓" && check_android_ndk' "$PROJECT_ROOT/lib/clean/dev.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" != *"NDK versions"* ]]
|
[[ "$output" != *"NDK versions"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "check_rust_toolchains reports multiple toolchains" {
|
@test "check_rust_toolchains reports multiple toolchains" {
|
||||||
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/.rustup/toolchains"/{stable,nightly,1.75.0}-aarch64-apple-darwin && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_WARNING="●" && rustup() { :; } && export -f rustup && check_rust_toolchains' "$PROJECT_ROOT/lib/clean/dev.sh"
|
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/.rustup/toolchains"/{stable,nightly,1.75.0}-aarch64-apple-darwin && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_SUCCESS="✓" && rustup() { :; } && export -f rustup && check_rust_toolchains' "$PROJECT_ROOT/lib/clean/dev.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"Rust toolchains: 3 found"* ]]
|
[[ "$output" == *"Rust toolchains: 3 found"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "check_rust_toolchains silent when only one toolchain" {
|
@test "check_rust_toolchains silent when only one toolchain" {
|
||||||
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/.rustup/toolchains/stable-aarch64-apple-darwin" && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_WARNING="●" && rustup() { :; } && export -f rustup && check_rust_toolchains' "$PROJECT_ROOT/lib/clean/dev.sh"
|
run bash -c 'HOME=$(mktemp -d) && mkdir -p "$HOME/.rustup/toolchains/stable-aarch64-apple-darwin" && source "$0" && note_activity() { :; } && NC="" && GREEN="" && GRAY="" && YELLOW="" && ICON_SUCCESS="✓" && rustup() { :; } && export -f rustup && check_rust_toolchains' "$PROJECT_ROOT/lib/clean/dev.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" != *"Rust toolchains"* ]]
|
[[ "$output" != *"Rust toolchains"* ]]
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ setup() {
|
|||||||
|
|
||||||
result=$(find_app_files "com.maestro.studio" "Maestro Studio")
|
result=$(find_app_files "com.maestro.studio" "Maestro Studio")
|
||||||
|
|
||||||
[[ "$result" =~ ".config/maestro-studio" ]]
|
[[ "$result" =~ .config/maestro-studio ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "find_app_files detects no-space variant (MaestroStudio)" {
|
@test "find_app_files detects no-space variant (MaestroStudio)" {
|
||||||
@@ -56,7 +56,7 @@ setup() {
|
|||||||
|
|
||||||
result=$(find_app_files "dev.zed.Zed-Nightly" "Zed Nightly")
|
result=$(find_app_files "dev.zed.Zed-Nightly" "Zed Nightly")
|
||||||
|
|
||||||
[[ "$result" =~ ".config/zed" ]]
|
[[ "$result" =~ .config/zed ]]
|
||||||
[[ "$result" =~ "Library/Application Support/Zed" ]]
|
[[ "$result" =~ "Library/Application Support/Zed" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,10 +73,10 @@ setup() {
|
|||||||
|
|
||||||
result=$(find_app_files "com.maestro.studio" "Maestro Studio")
|
result=$(find_app_files "com.maestro.studio" "Maestro Studio")
|
||||||
|
|
||||||
[[ "$result" =~ ".config/maestro-studio" ]]
|
[[ "$result" =~ .config/maestro-studio ]]
|
||||||
[[ "$result" =~ "Library/Application Support/MaestroStudio" ]]
|
[[ "$result" =~ "Library/Application Support/MaestroStudio" ]]
|
||||||
[[ "$result" =~ "Library/Application Support/Maestro-Studio" ]]
|
[[ "$result" =~ "Library/Application Support/Maestro-Studio" ]]
|
||||||
[[ "$result" =~ ".local/share/maestrostudio" ]]
|
[[ "$result" =~ .local/share/maestrostudio ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "find_app_files handles multi-word version suffix (Firefox Developer Edition)" {
|
@test "find_app_files handles multi-word version suffix (Firefox Developer Edition)" {
|
||||||
@@ -85,7 +85,7 @@ setup() {
|
|||||||
|
|
||||||
result=$(find_app_files "org.mozilla.firefoxdeveloperedition" "Firefox Developer Edition")
|
result=$(find_app_files "org.mozilla.firefoxdeveloperedition" "Firefox Developer Edition")
|
||||||
|
|
||||||
[[ "$result" =~ ".local/share/firefox" ]]
|
[[ "$result" =~ .local/share/firefox ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "find_app_files does not match empty app name" {
|
@test "find_app_files does not match empty app name" {
|
||||||
|
|||||||
Reference in New Issue
Block a user