mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
test: skip tests for uninstalled shells when run locally (#1517)
This commit is contained in:
parent
13c0e2fab0
commit
747a55fe4a
@ -8,12 +8,16 @@ setup() {
|
|||||||
export XDG_DATA_HOME=
|
export XDG_DATA_HOME=
|
||||||
export XDG_DATA_DIRS=
|
export XDG_DATA_DIRS=
|
||||||
|
|
||||||
|
if ! command -v elvish &>/dev/null && [ -z "$GITHUB_ACTIONS" ]; then
|
||||||
|
skip 'Elvish not installed'
|
||||||
|
fi
|
||||||
|
|
||||||
local ver_major=
|
local ver_major=
|
||||||
local ver_minor=
|
local ver_minor=
|
||||||
local ver_patch=
|
local ver_patch=
|
||||||
IFS='.' read -r ver_major ver_minor ver_patch <<<"$(elvish -version)"
|
IFS='.' read -r ver_major ver_minor ver_patch <<<"$(elvish -version)"
|
||||||
|
|
||||||
if ((ver_major == 0 && ver_minor < 18)); then
|
if ((ver_major == 0 && ver_minor < 18)) && [ -z "$GITHUB_ACTIONS" ]; then
|
||||||
skip "Elvish version is not at least 0.18. Found ${ver_major}.${ver_minor}.${ver_patch}"
|
skip "Elvish version is not at least 0.18. Found ${ver_major}.${ver_minor}.${ver_patch}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ load test_helpers
|
|||||||
setup() {
|
setup() {
|
||||||
cd "$(dirname "$BATS_TEST_DIRNAME")"
|
cd "$(dirname "$BATS_TEST_DIRNAME")"
|
||||||
|
|
||||||
if ! command -v fish; then
|
if ! command -v fish &>/dev/null && [ -z "$GITHUB_ACTIONS" ]; then
|
||||||
skip "Fish is not installed"
|
skip "Fish is not installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ load test_helpers
|
|||||||
setup() {
|
setup() {
|
||||||
cd "$(dirname "$BATS_TEST_DIRNAME")"
|
cd "$(dirname "$BATS_TEST_DIRNAME")"
|
||||||
|
|
||||||
if ! command -v nu; then
|
if ! command -v nu &>/dev/null && [ -z "$GITHUB_ACTIONS" ]; then
|
||||||
skip "Nu is not installed"
|
skip "Nu is not installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user