forked from asdf-vm/asdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_command.bats
More file actions
39 lines (33 loc) · 959 Bytes
/
list_command.bats
File metadata and controls
39 lines (33 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bats
load test_helpers
setup() {
setup_asdf_dir
install_dummy_plugin
}
teardown() {
clean_asdf_dir
}
@test "list_command should list plugins with installed versions" {
run asdf install dummy 1.0
run asdf install dummy 1.1
run asdf list
[ "$(echo -e "dummy\n 1.0\n 1.1")" == "$output" ]
[ "$status" -eq 0 ]
}
@test "list_command should continue listing even when no version is installed for any of the plugins" {
run install_mock_plugin "dummy"
run install_mock_plugin "mummy"
run install_mock_plugin "tummy"
run asdf install dummy 1.0
run asdf install tummy 2.0
run asdf list
[ "$(echo -e "dummy\n 1.0\nmummy\nNo versions installed\ntummy\n 2.0")" == "$output" ]
[ "$status" -eq 0 ]
}
@test "list_command with plugin should list installed versions" {
run asdf install dummy 1.0
run asdf install dummy 1.1
run asdf list dummy
[ "$(echo -e " 1.0\n 1.1")" == "$output" ]
[ "$status" -eq 0 ]
}