diff --git a/zunit b/zunit index aa2eea6..e0caf9a 100755 --- a/zunit +++ b/zunit @@ -122,6 +122,7 @@ function _zunit_assert_in() { [[ $i = $value ]] && found=1 done + [[ $found -eq 1 ]] && return 0 echo "'$value' is not in (${(@f)array})" @@ -324,6 +325,9 @@ function run() { function assert() { local value=$1 assertion=$2 local -a comparisons + + IFS=$'\n' + comparisons=(${(@)@:3}) if [[ -z $assertion ]]; then @@ -345,6 +349,8 @@ function assert() { if [[ $state -ne 0 ]]; then exit $state fi + + IFS=$oldIFS } ###