Make each event do something different

pull/662/head
Jorge Bucaran 3 years ago
parent 57ed19f945
commit f4739a8c7d
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30

@ -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…
Cancel
Save