fisher/test/install.fish
Jorge Bucaran 6c5cac3a18
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

45 lines
1.2 KiB
Fish

set -l path $DIRNAME/.t-$TESTNAME-(random)
function -S setup
mkdir -p $path/config/cache
source $DIRNAME/helpers/config-mock.fish $path/config
fisher install $DIRNAME/fixtures/plugins/{foo,bar} --quiet
fisher install $DIRNAME/fixtures/plugins/foobar --quiet
fisher install $DIRNAME/fixtures/plugins/baz --quiet
end
function -S teardown
rm -rf $path
source $DIRNAME/helpers/config-mock-teardown.fish
end
test "$TESTNAME - Install given plugins by name, url or path plugins"
(ls $fisher_cache) = foo bar baz foobar
end
test "$TESTNAME - Local paths are installed as symbolic links"
-L $path/config/cache/baz
end
for file in cache completions conf.d functions man fishfile key_bindings.fish
test "$TESTNAME - Add plugin $file to \$fisher_config/$file"
-e $path/config/$file
end
end
test "$TESTNAME - Append installed plugins to fishfile"
foo bar foobar baz = (
cat $path/config/fishfile
)
end
test "$TESTNAME - Add plugin key bindings to key_bindings.fish"
"##foobar## ##foobar##" = (cat $path/config/key_bindings.fish | xargs)
end
test "$TESTNAME - cache/.index is a copy of the URL in \$fisher_index"
(cat $path/config/cache/.index) = (cat $DIRNAME/fixtures/plugins/index)
end