Mercurial > hg > sonic-annotator
diff tests/test-include.sh @ 108:8b4924a9a072
Print diff
author | Chris Cannam |
---|---|
date | Thu, 02 Oct 2014 14:31:47 +0100 |
parents | 2633976fbef5 |
children | 0fe5abb56a6e |
line wrap: on
line diff
--- a/tests/test-include.sh Wed Oct 01 17:50:58 2014 +0100 +++ b/tests/test-include.sh Thu Oct 02 14:31:47 2014 +0100 @@ -22,4 +22,23 @@ return `[ -z "$out" ]` } +faildiff() { + echo "Test failed: $1" + if [ -n "$2" -a -n "$3" ]; then + echo "Output follows:" + echo "--" + cat $2 + echo "--" + echo "Expected output follows:" + echo "--" + cat $3 + echo "--" + echo "Diff:" + echo "--" + sdiff -w78 $2 $3 + echo "--" + fi + exit 1 +} +