fisher/tests/fisher.fish

34 lines
823 B
Fish
Raw Normal View History

2021-01-16 13:21:59 +00:00
set --local BASENAME --regex -- '[^/]+$'
@echo (fisher --version)
@test "fisher install" (
fisher install tests/ponyo >/dev/null
2021-01-16 13:31:30 +00:00
) "$ponyo" = "pyon pyon"
2021-01-16 13:21:59 +00:00
@test "fisher list" (
2021-01-16 13:31:30 +00:00
fisher list | string match $BASENAME | string join " "
2021-01-16 13:21:59 +00:00
) = "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
2021-01-16 13:31:30 +00:00
) "$ponyo" = "pyon pyon pyon"
2021-01-16 13:21:59 +00:00
@test "fisher remove" (
fisher remove tests/ponyo >/dev/null
2021-01-16 13:31:30 +00:00
) "$ponyo" = ""
2021-01-16 13:21:59 +00:00
@test "has state" -n (
set --names | string match \*fisher\* | string collect
2021-01-16 13:31:30 +00:00
)
@test fish_plugins (
fisher list | string collect
) = (read --null <$__fish_config_dir/fish_plugins | string collect)