test: reshim of plugins installed by path (#1287)

Co-authored-by: Benchi Lian <benchi.lian@thoughtworks.com>
Co-authored-by: James Hegedus <jthegedus@hey.com>
This commit is contained in:
alexezio 2023-04-05 21:48:13 +08:00 committed by GitHub
parent 8108ca6d7e
commit d28b13a8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,3 +157,19 @@ EOM
run grep -v 'borked_path_due_to_homebrew_update' "$dummy_shim" run grep -v 'borked_path_due_to_homebrew_update' "$dummy_shim"
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
} }
@test "reshim should allow local path versions" {
run asdf install dummy 1.0
mkdir -p "$ASDF_DIR/installs/dummy/path/bin/"
touch "$ASDF_DIR/installs/dummy/path/bin/dummy"
chmod +x "$ASDF_DIR/installs/dummy/path/bin/dummy"
run asdf reshim dummy "path:$ASDF_DIR/installs/dummy/path"
[ "$status" -eq 0 ]
run grep "asdf-plugin: dummy 1.0" "$ASDF_DIR/shims/dummy"
[ "$status" -eq 0 ]
run grep "asdf-plugin: dummy path:$ASDF_DIR/installs/dummy" "$ASDF_DIR/shims/dummy"
[ "$status" -eq 0 ]
}