Mercurial > hg > sonic-annotator
annotate tests/test-include.sh @ 69:7bb794886f50
Add overall project file
author | Chris Cannam |
---|---|
date | Tue, 20 Nov 2012 20:55:37 +0000 |
parents | 1141bc562301 |
children | 2633976fbef5 |
rev | line source |
---|---|
Chris@30 | 1 |
Chris@30 | 2 fail() { |
Chris@30 | 3 echo "Test failed: $1" |
Chris@30 | 4 exit 1 |
Chris@30 | 5 } |
Chris@30 | 6 |
Chris@30 | 7 csvcompare() { |
Chris@30 | 8 # permit some fuzz in final few digits |
Chris@30 | 9 a="$1" |
Chris@30 | 10 b="$2" |
Chris@30 | 11 perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__" |
Chris@30 | 12 perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__" |
Chris@30 | 13 cmp -s "${a}__" "${b}__" |
Chris@30 | 14 rv=$? |
Chris@30 | 15 rm "${a}__" "${b}__" |
Chris@30 | 16 return $rv |
Chris@30 | 17 } |
Chris@30 | 18 |