fisher/test/uninstall.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

47 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,foobar} --quiet
fisher uninstall foo --quiet
fisher uninstall foobar --quiet --force
end
function -S teardown
rm -rf $path
source $DIRNAME/helpers/config-mock-teardown.fish
end
for plugin in foo foobar
test "$TESTNAME - Uninstall a plugin ($plugin)"
! -f $path/config/functions/$plugin.fish
end
end
test "$TESTNAME - Remove plugin from fishfile"
bar = (cat $fisher_file)
end
test "$TESTNAME - *Do not* remove from cache unless --force is used"
-d $fisher_cache/foo
end
test "$TESTNAME - Remove plugin from cache using --force is used"
! -e $fisher_cache/foobar
end
test "$TESTNAME - Remove plugin key bindings from key_bindings.fish"
-z (cat $path/config/key_bindings.fish | xargs)
end
test "$TESTNAME - Remove plugin \$fisher_config/completions"
! -e $path/config/completions/foobar.fish
end
test "$TESTNAME - Remove plugin startup configuration from \$fisher_config/conf.d"
! -e $path/config/conf.d/conf.fish
end