Skip to content

Commit

Permalink
feat(golang-rewrite): correct shim_env_command.bats test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stratus3D committed Nov 27, 2024
1 parent 14683b3 commit 3120fa3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/shim_env_command.bats
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@ teardown() {
echo "dummy 1.0" >"$PROJECT_DIR/.tool-versions"
run asdf install

echo "export FOO=bar" >"$ASDF_DIR/plugins/dummy/bin/exec-env"
echo '#!/usr/bin/env bash
export FOO=bar' >"$ASDF_DIR/plugins/dummy/bin/exec-env"
chmod +x "$ASDF_DIR/plugins/dummy/bin/exec-env"

# Create a "system" dummy executable
echo '#!/usr/bin/env bash
echo "system dummy"' > $ASDF_BIN/dummy
chmod +x $ASDF_BIN/dummy

echo "dummy system" >"$PROJECT_DIR/.tool-versions"

run asdf env dummy
Expand All @@ -80,8 +86,10 @@ teardown() {
[ "$status" -eq 1 ]

run asdf env dummy which dummy
[ "$output" = "$ASDF_DIR/shims/dummy" ]
[ "$output" = "$ASDF_BIN/dummy" ]
[ "$status" -eq 0 ]
# Remove "system" dummy executable
rm $ASDF_BIN/dummy
}

@test "asdf env should set PATH correctly" {
Expand Down

0 comments on commit 3120fa3

Please sign in to comment.