Skip to content

Commit 7876fcd

Browse files
committed
Fix fish test
1 parent c847a99 commit 7876fcd

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

test/asdf_fish.bats

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,21 @@ cleaned_path() {
2525
[ "$result" != "" ]
2626
}
2727

28-
# Passes for me locally, doesn't work on Travis CI
29-
#@test "adds asdf dirs to PATH" {
30-
# result=$(fish -c "
31-
# set -e asdf
32-
# set -e ASDF_DIR
33-
# set -e ASDF_DATA_DIR
34-
# set PATH $(cleaned_path)
35-
#
36-
# source asdf.fish
37-
# echo \$PATH
38-
# ")
39-
#
40-
# echo $result
41-
# output=$(echo "$result" | grep "asdf")
42-
# [ "$?" -eq 0 ]
43-
# [ "$output" != "" ]
44-
#}
28+
@test "adds asdf dirs to PATH" {
29+
result=$(fish -c "
30+
set -e asdf
31+
set -e ASDF_DIR
32+
set -e ASDF_DATA_DIR
33+
set PATH $(cleaned_path)
34+
35+
source (pwd)/asdf.fish # if the full path is not passed, status -f will return the relative path
36+
echo \$PATH
37+
")
38+
39+
output=$(echo "$result" | grep "asdf")
40+
[ "$?" -eq 0 ]
41+
[ "$output" != "" ]
42+
}
4543

4644
@test "does not add paths to PATH more than once" {
4745
result=$(fish -c "

0 commit comments

Comments
 (0)