From 7876fcdd9002f8fc87bb50b15b7ceb8bbf84bc8d Mon Sep 17 00:00:00 2001 From: Daniel Perez Date: Sun, 7 Apr 2019 22:07:50 +0100 Subject: [PATCH] Fix fish test --- test/asdf_fish.bats | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/test/asdf_fish.bats b/test/asdf_fish.bats index 86e21d13..16f07492 100644 --- a/test/asdf_fish.bats +++ b/test/asdf_fish.bats @@ -25,23 +25,21 @@ cleaned_path() { [ "$result" != "" ] } -# Passes for me locally, doesn't work on Travis CI -#@test "adds asdf dirs to PATH" { -# result=$(fish -c " -# set -e asdf -# set -e ASDF_DIR -# set -e ASDF_DATA_DIR -# set PATH $(cleaned_path) -# -# source asdf.fish -# echo \$PATH -# ") -# -# echo $result -# output=$(echo "$result" | grep "asdf") -# [ "$?" -eq 0 ] -# [ "$output" != "" ] -#} +@test "adds asdf dirs to PATH" { + result=$(fish -c " + set -e asdf + set -e ASDF_DIR + set -e ASDF_DATA_DIR + set PATH $(cleaned_path) + + source (pwd)/asdf.fish # if the full path is not passed, status -f will return the relative path + echo \$PATH + ") + + output=$(echo "$result" | grep "asdf") + [ "$?" -eq 0 ] + [ "$output" != "" ] +} @test "does not add paths to PATH more than once" { result=$(fish -c "