2020-08-23 17:55:41 -07:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load test_helpers
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
setup_asdf_dir
|
|
|
|
install_dummy_plugin
|
|
|
|
install_dummy_legacy_plugin
|
|
|
|
run asdf install dummy 1.0
|
|
|
|
run asdf install dummy 1.1
|
|
|
|
|
2023-01-22 16:36:47 -07:00
|
|
|
PROJECT_DIR="$HOME/project"
|
|
|
|
mkdir -p "$PROJECT_DIR"
|
2020-08-23 17:55:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
teardown() {
|
|
|
|
clean_asdf_dir
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "info should show os, shell and asdf debug information" {
|
2023-01-22 21:29:18 -07:00
|
|
|
cd "$PROJECT_DIR"
|
2020-08-23 17:55:41 -07:00
|
|
|
|
|
|
|
run asdf info
|
|
|
|
|
|
|
|
[ "$status" -eq 0 ]
|
2023-02-19 04:10:05 -07:00
|
|
|
[[ $output == *$'OS:\n'* ]]
|
|
|
|
[[ $output == *$'SHELL:\n'* ]]
|
2023-03-26 15:28:16 -07:00
|
|
|
[[ $output == *$'BASH VERSION:\n'* ]]
|
2023-02-19 04:10:05 -07:00
|
|
|
[[ $output == *$'ASDF VERSION:\n'* ]]
|
2023-03-26 15:28:16 -07:00
|
|
|
[[ $output == *$'ASDF INTERNAL VARIABLES:\n'* ]]
|
2023-02-19 04:10:05 -07:00
|
|
|
[[ $output == *$'ASDF INSTALLED PLUGINS:\n'* ]]
|
|
|
|
|
2020-08-23 17:55:41 -07:00
|
|
|
}
|