mirror of
https://github.com/pyenv/pyenv.git
synced 2026-09-10 07:36:16 -04:00
tests: add 'fails on non-Linux system'
This commit is contained in:
parent
3e0ed2d1a0
commit
fa03780a37
|
|
@ -140,3 +140,21 @@ $envvarname=/unusual/shim/location:/another/shim/location
|
|||
_PYENV_SHIM_PATH=
|
||||
!
|
||||
}
|
||||
|
||||
@test "fails on non-Linux system" {
|
||||
# Make sure to use the system version of Python
|
||||
mkdir -p "$PYENV_TEST_DIR"
|
||||
cd "$PYENV_TEST_DIR"
|
||||
echo '' > .python-version
|
||||
|
||||
run uname -s
|
||||
if [ "$output" != Linux ]; then
|
||||
run pyenv-exec -N env
|
||||
assert_failure
|
||||
assert_output 'Error: the --environment option is supported only on Linux'
|
||||
else
|
||||
run pyenv-exec -N env
|
||||
echo "$status"
|
||||
assert_success
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue