Test cases now using `assert`

ns
Mike Gerwitz 2014-06-14 00:40:43 -04:00
parent 76a7b87663
commit 1a605a7648
2 changed files with 4 additions and 4 deletions

View File

@ -44,12 +44,12 @@ foo::bar::baz::next()
foo::bar::baz::try "${expected[@]}" foo::bar::baz::try "${expected[@]}"
set -- "${given[@]}" set -- "${given[@]}"
test $# -eq "${#expected[@]}" assert $# -eq "${#expected[@]}"
# all arguments should be passed, properly quoted # all arguments should be passed, properly quoted
declare -i i=0 declare -i i=0
while true; do while true; do
test "$1" == "${expected[i]}" assert "$1" == "${expected[i]}"
shift || break shift || break
((++i)) ((++i))
done done

View File

@ -44,12 +44,12 @@ next()
try "${expected[@]}" try "${expected[@]}"
set -- "${given[@]}" set -- "${given[@]}"
test $# -eq "${#expected[@]}" assert $# -eq "${#expected[@]}"
# all arguments should be passed, properly quoted # all arguments should be passed, properly quoted
declare -i i=0 declare -i i=0
while true; do while true; do
test "$1" == "${expected[i]}" assert "$1" == "${expected[i]}"
shift || break shift || break
((++i)) ((++i))
done done