mirror of https://github.com/jorgebucaran/fisher
Add some tests
parent
7ed1de7e56
commit
57ed19f945
@ -0,0 +1,33 @@
|
||||
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
|
||||
|
||||
@test "fisher list" (
|
||||
fisher list | string match $BASENAME | string join " "
|
||||
) = "fisher fishtape ponyo"
|
||||
|
||||
@test "fisher list regex" (
|
||||
fisher list ponyo | string match $BASENAME
|
||||
) = ponyo
|
||||
|
||||
@test "pyon pyon" (fish --command ponyo | string join " ") = "pyon pyon ponyo"
|
||||
|
||||
@test "fisher update" (
|
||||
fisher update tests/ponyo >/dev/null
|
||||
) "$ponyo" = "pyon pyon"
|
||||
|
||||
@test "fisher remove" (
|
||||
fisher remove tests/ponyo >/dev/null
|
||||
) "$ponyo" = "pyon pyon pyon"
|
||||
|
||||
@test "has state" -n (
|
||||
set --names | string match \*fisher\* | string collect
|
||||
)
|
@ -0,0 +1,13 @@
|
||||
echo pyon pyon
|
||||
|
||||
function ponyo_install --on-event ponyo_install
|
||||
set --global ponyo pyon
|
||||
end
|
||||
|
||||
function ponyo_update --on-event ponyo_update
|
||||
set --global --append ponyo pyon
|
||||
end
|
||||
|
||||
function ponyo_uninstall --on-event ponyo_uninstall
|
||||
set --global --append ponyo pyon
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
function ponyo
|
||||
echo ponyo
|
||||
end
|
Loading…
Reference in New Issue