mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-19 09:25:40 +00:00
a25fc7353e
Remove scripts directory in favor of using the functions/ or root for sharing scripts. Using a scripts directory does not solve the main problem of sharing scripts with the same name, so this addition was deemed of little value. In the future, a more robust way to avoid name collisions when sharing scripts would be nice to have, but at the moment having a scripts directory is not solving this problem but just adding clutter to the configuration. Closes #105.
47 lines
1.1 KiB
Fish
47 lines
1.1 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 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
|