Introduce --partial on assert_output
This commit is contained in:
parent
475b0c6fa1
commit
3036d6d37e
2 changed files with 29 additions and 0 deletions
|
|
@ -53,6 +53,15 @@ assert_failure() {
|
|||
fi
|
||||
}
|
||||
assert_output() {
|
||||
if [ "${1:-}" = "--partial" ]; then
|
||||
local expected="$2"
|
||||
if [[ "$output" != *"$expected"* ]]; then
|
||||
echo "Expected output to contain: $expected"
|
||||
echo "Actual output: $output"
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
if [ "$output" != "$1" ]; then
|
||||
echo "Expected output to equal: $1"
|
||||
echo "Actual output: $output"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue