Files
pyenv/test/commands.bats
admin b622f8abd2
Some checks are pending
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.13) (push) Waiting to run
macos_build / macos_build (3.14) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-15) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-15-intel) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-26) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Waiting to run
ubuntu_build / ubuntu_build (3.10) (push) Waiting to run
ubuntu_build / ubuntu_build (3.11) (push) Waiting to run
ubuntu_build / ubuntu_build (3.12) (push) Waiting to run
ubuntu_build / ubuntu_build (3.13) (push) Waiting to run
ubuntu_build / ubuntu_build (3.14) (push) Waiting to run
pyenv verification source
2026-05-22 16:45:42 +08:00

40 lines
693 B
Bash

#!/usr/bin/env bats
load test_helper
@test "commands" {
run pyenv-commands
assert_success
assert_line "init"
assert_line "rehash"
assert_line "shell"
refute_line "sh-shell"
assert_line "echo"
}
@test "commands --sh" {
run pyenv-commands --sh
assert_success
refute_line "init"
assert_line "shell"
}
@test "commands in path with spaces" {
path="${PYENV_TEST_DIR}/my commands"
cmd="${path}/pyenv-sh-hello"
mkdir -p "$path"
touch "$cmd"
chmod +x "$cmd"
PATH="${path}:$PATH" run pyenv-commands --sh
assert_success
assert_line "hello"
}
@test "commands --no-sh" {
run pyenv-commands --no-sh
assert_success
assert_line "init"
refute_line "shell"
}