fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
923d0b797
master
1#RUN: fish=%fish %fish %s 2 3set -e FISH_UNIT_TESTS_RUNNING 4function expect-datadirs 5$fish -c' 6for datadir in $argv 7contains -- $datadir/fish/vendor_functions.d $fish_function_path 8and echo function_path has $datadir 9contains -- $datadir/fish/vendor_completions.d $fish_complete_path 10and echo complete_path has $datadir 11contains -- $datadir/fish/vendor_conf.d $__fish_vendor_confdirs 12and echo vendor_conf has $datadir 13end 14' $argv 15end 16 17expect-datadirs /usr/local/share /usr/share 18# CHECK: function_path has /usr/local/share 19# CHECK: complete_path has /usr/local/share 20# CHECK: vendor_conf has /usr/local/share 21# CHECK: function_path has /usr/share 22# CHECK: complete_path has /usr/share 23# CHECK: vendor_conf has /usr/share 24 25XDG_DATA_DIRS= expect-datadirs /usr/local/share /usr/share 26# CHECK: function_path has /usr/local/share 27# CHECK: complete_path has /usr/local/share 28# CHECK: vendor_conf has /usr/local/share 29# CHECK: function_path has /usr/share 30# CHECK: complete_path has /usr/share 31# CHECK: vendor_conf has /usr/share 32 33XDG_DATA_DIRS=/custom/path1:/custom/path2 expect-datadirs /custom/path1 /custom/path2 34# CHECK: function_path has /custom/path1 35# CHECK: complete_path has /custom/path1 36# CHECK: vendor_conf has /custom/path1 37# CHECK: function_path has /custom/path2 38# CHECK: complete_path has /custom/path2 39# CHECK: vendor_conf has /custom/path2