From f4739a8c7df13acad6ade87307e2dc4404c8bdb9 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sat, 16 Jan 2021 22:31:30 +0900 Subject: [PATCH] Make each event do something different --- tests/fisher.fish | 18 +++++++++--------- tests/ponyo/conf.d/ponyo.fish | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/fisher.fish b/tests/fisher.fish index 968aee5..2581db8 100644 --- a/tests/fisher.fish +++ b/tests/fisher.fish @@ -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) diff --git a/tests/ponyo/conf.d/ponyo.fish b/tests/ponyo/conf.d/ponyo.fish index 5c74eff..4b495c9 100644 --- a/tests/ponyo/conf.d/ponyo.fish +++ b/tests/ponyo/conf.d/ponyo.fish @@ -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 \ No newline at end of file