mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
Merge pull request #371 from phunehehe/version-set-by
commands/current: add space before parenthesis
This commit is contained in:
commit
f708e3c15f
@ -19,7 +19,7 @@ plugin_current_command() {
|
||||
printf "%s\\n" "$(display_no_version_set "$plugin_name")"
|
||||
exit 126
|
||||
else
|
||||
printf "%-8s%s\\n" "$version" "(set by $version_file_path)"
|
||||
printf "%-8s (set by %s)\\n" "$version" "$version_file_path"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ setup() {
|
||||
install_dummy_plugin
|
||||
install_dummy_version "1.1.0"
|
||||
install_dummy_version "1.2.0"
|
||||
install_dummy_version "nightly-2000-01-01"
|
||||
|
||||
PROJECT_DIR=$HOME/project
|
||||
mkdir $PROJECT_DIR
|
||||
@ -28,6 +29,15 @@ teardown() {
|
||||
[ "$output" = "1.1.0 (set by $PROJECT_DIR/.tool-versions)" ]
|
||||
}
|
||||
|
||||
@test "current should handle long version name" {
|
||||
cd $PROJECT_DIR
|
||||
echo "dummy nightly-2000-01-01" >> $PROJECT_DIR/.tool-versions
|
||||
|
||||
run current_command "dummy"
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "nightly-2000-01-01 (set by $PROJECT_DIR/.tool-versions)" ]
|
||||
}
|
||||
|
||||
@test "current should derive from the legacy file if enabled" {
|
||||
cd $PROJECT_DIR
|
||||
echo 'legacy_version_file = yes' > $HOME/.asdfrc
|
||||
|
Loading…
Reference in New Issue
Block a user