mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Add test for the resolve_symlink function.
This commit is contained in:
parent
64d4e145a1
commit
2bc679084f
@ -268,3 +268,25 @@ teardown() {
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "$PROJECT_DIR/.tool-versions" ]
|
||||
}
|
||||
|
||||
@test "resolve_symlink converts the symlink path to the real file path" {
|
||||
touch foo
|
||||
ln -s $(pwd)/foo bar
|
||||
|
||||
run resolve_symlink bar
|
||||
[ "$status" -eq 0 ]
|
||||
echo $status
|
||||
[ "$output" = $(pwd)/foo ]
|
||||
rm -f foo bar
|
||||
}
|
||||
|
||||
@test "resolve_symlink converts relative symlink path to the real file path" {
|
||||
touch foo
|
||||
ln -s foo bar
|
||||
|
||||
run resolve_symlink bar
|
||||
[ "$status" -eq 0 ]
|
||||
echo $status
|
||||
[ "$output" = $(pwd)/foo ]
|
||||
rm -f foo bar
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user