mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-17 20:57:10 +02:00
prod/Common (expect, expect_re): allow multiple arguments (for options)
This commit is contained in:
parent
32744af2ab
commit
c2163a6954
@ -95,7 +95,7 @@ cmd()
|
|||||||
expect()
|
expect()
|
||||||
{
|
{
|
||||||
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
||||||
fgrep -q "$1" _out || { echo "expected $1" | fail; exit 1; }
|
fgrep -q "$@" _out || { echo "expected $*" | fail; exit 1; }
|
||||||
pass
|
pass
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ expect()
|
|||||||
expect_re()
|
expect_re()
|
||||||
{
|
{
|
||||||
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
eval "$cmd" >_out 2>&1 || { echo "exit code $?" | fail; exit 1; }
|
||||||
grep -q "$1" _out || { echo "expected $1" | fail; exit 1; }
|
grep -q "$@" _out || { echo "expected $*" | fail; exit 1; }
|
||||||
pass
|
pass
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user