mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-12-24 04:15:08 -07:00
822e14c561
* Enable `shim_versions_command.bats` tests * Create `asdf shimversions` command
31 lines
553 B
Bash
31 lines
553 B
Bash
#!/usr/bin/env bats
|
|
# shellcheck disable=SC2164
|
|
|
|
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"
|
|
run asdf install dummy 3.0
|
|
run asdf install dummy 1.0
|
|
run asdf reshim dummy
|
|
|
|
run asdf shimversions dummy
|
|
[ "$status" -eq 0 ]
|
|
|
|
echo "$output" | grep "dummy 3.0"
|
|
echo "$output" | grep "dummy 1.0"
|
|
}
|