8
install_dummy_legacy_plugin
15
####################################################
16
#### plugin with bin/latest-stable ####
17
####################################################
18
@test "[latest_command - dummy_plugin] shows latest stable version" {
20
[ "2.0.0" = "$output" ]
24
@test "[latest_command - dummy_plugin] shows latest stable version that matches the given string" {
25
run asdf latest dummy 1
26
[ "1.1.0" = "$output" ]
30
@test "[latest_command - dummy_plugin] an invalid version should return an error" {
31
run asdf latest dummy 3
32
[ "No compatible versions available (dummy 3)" = "$output" ]
36
####################################################
37
#### plugin without bin/latest-stable ####
38
####################################################
39
@test "[latest_command - dummy_legacy_plugin] shows latest stable version" {
40
run asdf latest legacy-dummy
41
[ "5.1.0" = "$output" ]
45
@test "[latest_command - dummy_legacy_plugin] shows latest stable version that matches the given string" {
46
run asdf latest legacy-dummy 1
47
[ "1.1.0" = "$output" ]
51
@test "[latest_command - dummy_legacy_plugin] No stable version should return an error" {
52
run asdf latest legacy-dummy 3
57
@test "[latest_command - dummy_legacy_plugin] do not show latest unstable version that matches the given string" {
58
run asdf latest legacy-dummy 4
59
[ "4.0.0" = "$output" ]
63
@test "[latest_command - dummy_legacy_plugin] do not show latest unstable version with capital characters that matches the given string" {
64
run asdf latest legacy-dummy 5
65
[ "5.1.0" = "$output" ]
69
@test "[latest_command - dummy_legacy_plugin] an invalid version should return an error" {
70
run asdf latest legacy-dummy 6
71
[ "No compatible versions available (legacy-dummy 6)" = "$output" ]
75
################################
77
################################
78
@test "[latest_command - all plugins] shows the latest stable version of all plugins" {
79
run asdf install dummy 2.0.0
80
run asdf install legacy-dummy 4.0.0
82
[ $'dummy\t2.0.0\tinstalled\nlegacy-dummy\t5.1.0\tmissing' = "$output" ]
86
@test "[latest_command - all plugins] not installed plugin should return missing" {
88
[ $'dummy\t2.0.0\tmissing\nlegacy-dummy\t5.1.0\tmissing' = "$output" ]