mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 21:33:54 -05:00
use BATS_FILE_TMPDIR in test/plugin test
use global setup with bats with possibility to add specific test file _setup use readlink in helper if realpath is not working as expected
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
load test_helper
|
||||
|
||||
@test "installs python-build into PREFIX" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
assert_success ""
|
||||
|
||||
@@ -18,7 +18,7 @@ load test_helper
|
||||
}
|
||||
|
||||
@test "build definitions don't have the executable bit" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh"
|
||||
assert_success ""
|
||||
|
||||
@@ -30,7 +30,7 @@ OUT
|
||||
}
|
||||
|
||||
@test "overwrites old installation" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
mkdir -p bin share/python-build
|
||||
touch bin/python-build
|
||||
touch share/python-build/2.7.2
|
||||
@@ -44,7 +44,7 @@ OUT
|
||||
}
|
||||
|
||||
@test "unrelated files are untouched" {
|
||||
cd "$TMP"
|
||||
cd "$BATS_TEST_TMPDIR"
|
||||
mkdir -p bin share/bananas
|
||||
chmod g-w bin
|
||||
touch bin/bananas
|
||||
|
||||
Reference in New Issue
Block a user