Test cases now using `assert`
parent
76a7b87663
commit
1a605a7648
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue