#!/usr/bin/env bats load test_helper @test "fails with invalid version" { bats_require_minimum_version 1.5.0 export PYENV_VERSION="3.4" run -127 pyenv-exec nonexistent assert_failure < .python-version run -127 pyenv-exec nonexistent assert_failure < .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 }