2019-01-19 03:48:22 -07:00
|
|
|
#!/usr/bin/env bats
|
2023-01-25 06:37:21 -07:00
|
|
|
# shellcheck disable=SC2164
|
2019-01-19 03:48:22 -07:00
|
|
|
|
|
|
|
load test_helpers
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
setup_asdf_dir
|
|
|
|
install_dummy_plugin
|
|
|
|
|
|
|
|
PROJECT_DIR="$HOME/project"
|
|
|
|
mkdir -p "$PROJECT_DIR"
|
|
|
|
cd "$PROJECT_DIR"
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown() {
|
|
|
|
clean_asdf_dir
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "shim_versions_command should list plugins and versions where command is available" {
|
|
|
|
cd "$PROJECT_DIR"
|
2019-01-20 01:13:20 -07:00
|
|
|
run asdf install dummy 3.0
|
|
|
|
run asdf install dummy 1.0
|
|
|
|
run asdf reshim dummy
|
2019-01-19 03:48:22 -07:00
|
|
|
|
2024-10-31 06:20:00 -07:00
|
|
|
run asdf shimversions dummy
|
2019-01-19 03:48:22 -07:00
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
|
|
|
echo "$output" | grep "dummy 3.0"
|
|
|
|
echo "$output" | grep "dummy 1.0"
|
|
|
|
}
|