nvm/test/common.sh

14 lines
257 B
Bash

assert_ok() {
local FUNCTION=$1
shift
$($FUNCTION $@) || die '"'"$FUNCTION $@"'" should have succeeded, but failed'
}
assert_not_ok() {
local FUNCTION=$1
shift
! $($FUNCTION $@) || die '"'"$FUNCTION $@"'" should have failed, but succeeded'
}