Test cases now using `assert`
parent
76a7b87663
commit
1a605a7648
|
@ -44,12 +44,12 @@ foo::bar::baz::next()
|
|||
foo::bar::baz::try "${expected[@]}"
|
||||
|
||||
set -- "${given[@]}"
|
||||
test $# -eq "${#expected[@]}"
|
||||
assert $# -eq "${#expected[@]}"
|
||||
|
||||
# all arguments should be passed, properly quoted
|
||||
declare -i i=0
|
||||
while true; do
|
||||
test "$1" == "${expected[i]}"
|
||||
assert "$1" == "${expected[i]}"
|
||||
shift || break
|
||||
((++i))
|
||||
done
|
||||
|
|
|
@ -44,12 +44,12 @@ next()
|
|||
try "${expected[@]}"
|
||||
|
||||
set -- "${given[@]}"
|
||||
test $# -eq "${#expected[@]}"
|
||||
assert $# -eq "${#expected[@]}"
|
||||
|
||||
# all arguments should be passed, properly quoted
|
||||
declare -i i=0
|
||||
while true; do
|
||||
test "$1" == "${expected[i]}"
|
||||
assert "$1" == "${expected[i]}"
|
||||
shift || break
|
||||
((++i))
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue