Add a test for fish_add_path with relative paths

This commit is contained in:
Fabian Boehm 2023-09-29 16:52:50 +02:00
parent 9fa70d3ace
commit ff8a79a823

View File

@ -36,6 +36,13 @@ fish_add_path -v $tmpdir/link
echo $status
# CHECK: 0
# Relative paths are made absolute
set -l oldpwd $PWD
cd $tmpdir
fish_add_path -nv sbin .
# CHECK: set fish_user_paths /{{.*}}/sbin /{{.*}} /{{.*}}/link /{{.*}}/bin
cd $oldpwd
fish_add_path -a $tmpdir/sbin
# Not printing anything because it's not verbose, the /sbin should be added at the end.
string replace -- $tmpdir '' $fish_user_paths | string join ' '