1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-11-17 11:42:33 +01:00

report output content when test fails

This commit is contained in:
Jan Horacek (jahor/jhrcz) 2013-04-25 17:19:59 +02:00
parent 040deba950
commit 86ca8dcba8

View File

@ -37,6 +37,7 @@ run() {
set +e
output="$("$@" 2>&1)"
status="$?"
echo "$output" | sed -e 's/^/ #output#/' > "$BATS_OUT"
IFS=$'\n' lines=($output)
[ -z "$e" ] || set -e
}