mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: add missing "does not add paths to PATH more than once" test for elvish (#1275)
This commit is contained in:
parent
f2d5d4890b
commit
3c55167a68
@ -73,6 +73,20 @@ cleaned_path() {
|
||||
[[ "$output" =~ "<ns " ]]
|
||||
}
|
||||
|
||||
@test "does not add paths to PATH more than once" {
|
||||
result=$(elvish -norc -c "
|
||||
unset-env ASDF_DIR
|
||||
set paths = [$(cleaned_path)]
|
||||
|
||||
use asdftest _asdf; var asdf~ = \$_asdf:asdf~
|
||||
use asdftest _asdf; var asdf~ = \$_asdf:asdf~
|
||||
echo \$E:PATH
|
||||
")
|
||||
[ "$?" -eq 0 ]
|
||||
output=$(echo $PATH | tr ':' '\n' | grep "asdf" | sort | uniq -d)
|
||||
[ "$output" = "" ]
|
||||
}
|
||||
|
||||
@test "defines the asdf function" {
|
||||
output=$(elvish -norc -c "
|
||||
unset-env ASDF_DIR
|
||||
|
Loading…
Reference in New Issue
Block a user