mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
0ce18100c5
This adds a helper to install dummy versions. Hopefully it makes the test setup a little easier to reason about.
24 lines
464 B
Bash
24 lines
464 B
Bash
. $(dirname $BATS_TEST_DIRNAME)/lib/utils.sh
|
|
|
|
setup_asdf_dir() {
|
|
BASE_DIR=$(mktemp -dt asdf.XXXX)
|
|
HOME=$BASE_DIR/home
|
|
ASDF_DIR=$HOME/.asdf
|
|
mkdir -p $ASDF_DIR/plugins
|
|
mkdir -p $ASDF_DIR/installs
|
|
}
|
|
|
|
install_dummy_plugin() {
|
|
cp -r $BATS_TEST_DIRNAME/fixtures/dummy_plugin $ASDF_DIR/plugins/dummy
|
|
}
|
|
|
|
install_dummy_version() {
|
|
dummy_version=$1
|
|
mkdir -p $ASDF_DIR/installs/dummy/$dummy_version
|
|
}
|
|
|
|
clean_asdf_dir() {
|
|
rm -rf $BASE_DIR
|
|
unset ASDF_DIR
|
|
}
|