From d28b13a8c7a5f2cc99975a16fdd4e2769eab115b Mon Sep 17 00:00:00 2001 From: alexezio <35565813+alexezio@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:48:13 +0800 Subject: [PATCH] test: reshim of plugins installed by path (#1287) Co-authored-by: Benchi Lian Co-authored-by: James Hegedus --- test/reshim_command.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/reshim_command.bats b/test/reshim_command.bats index 4b2bd549..4b1db7ef 100644 --- a/test/reshim_command.bats +++ b/test/reshim_command.bats @@ -157,3 +157,19 @@ EOM run grep -v 'borked_path_due_to_homebrew_update' "$dummy_shim" [ "$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 ] +}