From a81da8d864c46c82b8d4ddc8da778f2cdf4274dd Mon Sep 17 00:00:00 2001 From: Jeff Kowalski Date: Tue, 16 May 2017 13:36:06 -0700 Subject: [PATCH] Revert quoting change in previous commit; adjust test to match code Revert back to original quoting style used before previous commit. Adjust init.bats to reflect changes for successful tests. --- libexec/rbenv-init | 2 +- test/init.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 test/init.bats diff --git a/libexec/rbenv-init b/libexec/rbenv-init index e8ae8d5a..1661a052 100755 --- a/libexec/rbenv-init +++ b/libexec/rbenv-init @@ -86,7 +86,7 @@ mkdir -p "${RBENV_ROOT}/"{shims,versions} case "$shell" in fish ) - echo 'set -gx PATH '${RBENV_ROOT}'/shims $PATH' + echo "set -gx PATH '${RBENV_ROOT}/shims' \$PATH" echo "set -gx RBENV_SHELL $shell" ;; * ) diff --git a/test/init.bats b/test/init.bats old mode 100644 new mode 100755 index 95be301c..6cf64e8b --- a/test/init.bats +++ b/test/init.bats @@ -73,7 +73,7 @@ OUT export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin" run rbenv-init - fish assert_success - assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH" + assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH" } @test "can add shims to PATH more than once" { @@ -87,7 +87,7 @@ OUT export PATH="${RBENV_ROOT}/shims:$PATH" run rbenv-init - fish assert_success - assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH" + assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH" } @test "outputs sh-compatible syntax" {