mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-12-24 04:15:08 -07:00
c0963a38a6
* Correct `logger.Printf` call * Get `plugin_remove_command.bats` tests passing * Enable plugin_remove_command BATS tests * Create `versions.NoVersionSetError` struct * Set `ASDF_CONCURRENCY` for install callbacks
29 lines
562 B
Bash
29 lines
562 B
Bash
#!/usr/bin/env bats
|
|
|
|
load test_helpers
|
|
|
|
setup() {
|
|
setup_asdf_dir
|
|
install_dummy_plugin
|
|
}
|
|
|
|
teardown() {
|
|
clean_asdf_dir
|
|
}
|
|
|
|
@test "plugin_remove command removes the plugin directory" {
|
|
run asdf install dummy 1.0
|
|
[ "$status" -eq 0 ]
|
|
[ -d "$ASDF_DIR/downloads/dummy" ]
|
|
|
|
run asdf plugin remove "dummy"
|
|
[ "$status" -eq 0 ]
|
|
[ ! -d "$ASDF_DIR/downloads/dummy" ]
|
|
}
|
|
|
|
@test "plugin_remove command fails if the plugin doesn't exist" {
|
|
run asdf plugin remove "does-not-exist"
|
|
[ "$status" -eq 1 ]
|
|
echo "$output" | grep "No such plugin: does-not-exist"
|
|
}
|