fisher/test/list.fish
Jorge Bucaran ebf1de50a1 Ahoy! Fisherman 1.4.0 has shipped.
Notable changes:

+ Now fisher list does not show plugins that are disabled,
  but available in the cache. To preview these items use
  fisher list --disabled.

+ Welcome aboard @orangecms and @xrain0610.

+ Fisherman is now available in AUR, thanks @orangecms.

+ Fix load order during installation. Now snippets can
  safely invoke functions defined in the plugin function
  directory. Thanks @orangecms. #170.

+ Fisherman **installs and updates plugins ⌁concurrently**.
  Performance may vary, but if you can see 5 to 10 times
  faster network times, it's working well.
2016-03-31 02:42:44 +09:00

49 lines
1.2 KiB
Fish

set -l path $DIRNAME/.t-$TESTNAME-(random)
set -l fisherman_url https://github.com/fisherman/fisherman
function -S setup
mkdir -p $path/cache/{foo,bar,baz,norf} $path/theme
ln -s $path/theme $path/cache/theme
printf "%s\n" foo bar baz theme > $path/fishfile
set -g fisher_cache $path/cache
set -g fisher_file $path/fishfile
set -U fisher_prompt theme
source $DIRNAME/helpers/git-ls-remote.fish
end
function -S teardown
rm -rf $path
functions -e git
end
test "$TESTNAME - Append @ to linked theme"
(fisher list | sed -n '/@.*/p') = "@ theme"
end
test "$TESTNAME - Indent plugins to match indent when links or prompts are installed"
(fisher list | sed -n '/ .*/p' | xargs) = "foo bar baz"
end
test "$TESTNAME - Do not display disabled plugins"
-z (
rm $path/fishfile
fisher list
)
end
test "$TESTNAME - Show active / enabled plugins/prompts with fisher list=enabled"
foo bar baz theme = (fisher list --enabled)
end
test "$TESTNAME - Show disabled/inactive plugins/prompts with fisher list=disabled"
(fisher list --disabled) = norf
end
test "$TESTNAME - Parse a fishfile and display plugins with fisher list=<file>"
foo bar baz theme = (fisher list - < $fisher_file)
end