mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Make each event do something different
This commit is contained in:
parent
57ed19f945
commit
f4739a8c7d
2 changed files with 11 additions and 11 deletions
|
@ -2,16 +2,12 @@ set --local BASENAME --regex -- '[^/]+$'
|
|||
|
||||
@echo (fisher --version)
|
||||
|
||||
@test fish_plugins (
|
||||
fisher list | string collect
|
||||
) = (read --null <$__fish_config_dir/fish_plugins | string collect)
|
||||
|
||||
@test "fisher install" (
|
||||
fisher install tests/ponyo >/dev/null
|
||||
) "$ponyo" = pyon
|
||||
) "$ponyo" = "pyon pyon"
|
||||
|
||||
@test "fisher list" (
|
||||
fisher list | string match $BASENAME | string join " "
|
||||
fisher list | string match $BASENAME | string join " "
|
||||
) = "fisher fishtape ponyo"
|
||||
|
||||
@test "fisher list regex" (
|
||||
|
@ -22,12 +18,16 @@ set --local BASENAME --regex -- '[^/]+$'
|
|||
|
||||
@test "fisher update" (
|
||||
fisher update tests/ponyo >/dev/null
|
||||
) "$ponyo" = "pyon pyon"
|
||||
) "$ponyo" = "pyon pyon pyon"
|
||||
|
||||
@test "fisher remove" (
|
||||
fisher remove tests/ponyo >/dev/null
|
||||
) "$ponyo" = "pyon pyon pyon"
|
||||
) "$ponyo" = ""
|
||||
|
||||
@test "has state" -n (
|
||||
set --names | string match \*fisher\* | string collect
|
||||
)
|
||||
)
|
||||
|
||||
@test fish_plugins (
|
||||
fisher list | string collect
|
||||
) = (read --null <$__fish_config_dir/fish_plugins | string collect)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
echo pyon pyon
|
||||
|
||||
function ponyo_install --on-event ponyo_install
|
||||
set --global ponyo pyon
|
||||
set --global ponyo pyon pyon
|
||||
end
|
||||
|
||||
function ponyo_update --on-event ponyo_update
|
||||
|
@ -9,5 +9,5 @@ function ponyo_update --on-event ponyo_update
|
|||
end
|
||||
|
||||
function ponyo_uninstall --on-event ponyo_uninstall
|
||||
set --global --append ponyo pyon
|
||||
set --erase ponyo
|
||||
end
|
Loading…
Reference in a new issue