1
0
mirror of https://github.com/zplug/zplug synced 2025-09-01 02:30:47 +02:00
zplug/test/autoload/utils/__arguments___test.zsh
2016-04-27 21:55:49 +09:00

48 lines
1.1 KiB
Bash

#!/bin/zsh
: before
{
source "$ZPLUG_ROOT/init.zsh"
source "$ZPLUG_ROOT/test/.helpers/mock.zsh"
source "$ZPLUG_ROOT/test/.helpers/helper.zsh"
export ZPLUG_HOME="$ZPLUG_ROOT/test/.fixtures"
local expect actual
}
describe "__arguments__"
it ""
expect="[zplug] foobarbaz: no such command"
actual="$(zplug foobarbaz 2>&1)"
assert.false $status
assert.equals "$expect" "$actual"
end
it ""
zplugs=()
expect="[zplug] WARNING: You called a zplug command named 'lisa', which does not exist.
Continuing under the assumption that you meant 'list'.
[zplug] no package managed by zplug"
actual="$(zplug lisa 2>&1 | unansi)"
assert.equals "$expect" "$actual"
end
it ""
zplugs=()
expect="[zplug] 'lost' is not a zplug command. See 'zplug help'.
Did you mean one of these?
list
load"
actual="$(zplug lost 2>&1)"
assert.false $status
assert.equals "$expect" "$actual"
end
end
: after
{
zplugs=()
unset expect actual
}