diff --git a/test/global.bats b/test/global.bats index be67987d..18634bab 100644 --- a/test/global.bats +++ b/test/global.bats @@ -17,7 +17,7 @@ load test_helper } @test "version with glob characters is handled correctly" { - touch 1.1 + cd "$BATS_TEST_TMPDIR"; touch 1.1 mkdir -p "$PYENV_ROOT" echo "[1-9].?*" > "$PYENV_ROOT/version" run pyenv-global diff --git a/test/local.bats b/test/local.bats index 74d02e8a..84205cce 100644 --- a/test/local.bats +++ b/test/local.bats @@ -20,7 +20,7 @@ _setup() { } @test "version with glob characters is handled correctly" { - touch 1.1 + cd "$BATS_TEST_TMPDIR"; touch 1.1 echo "[1-9].?*" > .python-version run pyenv-local assert_success "[1-9].?*" diff --git a/test/prefix.bats b/test/prefix.bats index 3a6bfb6a..28a22a55 100644 --- a/test/prefix.bats +++ b/test/prefix.bats @@ -17,7 +17,7 @@ load test_helper } @test "version with glob characters is handled correctly" { - touch 1.1 + cd "$BATS_TEST_TMPDIR"; touch 1.1 PYENV_VERSION="[1-9].?*" run pyenv-prefix assert_failure "pyenv: version \`[1-9].?*' not installed" } diff --git a/test/version-name.bats b/test/version-name.bats index 95afded8..67535291 100644 --- a/test/version-name.bats +++ b/test/version-name.bats @@ -23,7 +23,7 @@ _setup() { } @test "version with glob characters is handled correctly" { - touch 1.1 + cd "$BATS_TEST_TMPDIR"; touch 1.1 PYENV_VERSION="[1-9].?*" run pyenv-version-name assert_failure <<'!' pyenv: version `[1-9].?*' is not installed (set by PYENV_VERSION environment variable) diff --git a/test/version.bats b/test/version.bats index 25623413..53c31f06 100644 --- a/test/version.bats +++ b/test/version.bats @@ -81,7 +81,7 @@ OUT } @test "version with glob characters is handled correctly" { - touch 1.1 + cd "$BATS_TEST_TMPDIR"; touch 1.1 PYENV_VERSION="[1-9].?*" run pyenv-version assert_failure assert_output <