comparison tests/test-include.sh @ 30:1141bc562301

* Add forgotten file! Oh no!
author Chris Cannam
date Fri, 09 Oct 2009 09:13:21 +0000
parents
children 2633976fbef5
comparison
equal deleted inserted replaced
29:f7a1b84c447c 30:1141bc562301
1
2 fail() {
3 echo "Test failed: $1"
4 exit 1
5 }
6
7 csvcompare() {
8 # permit some fuzz in final few digits
9 a="$1"
10 b="$2"
11 perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__"
12 perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__"
13 cmp -s "${a}__" "${b}__"
14 rv=$?
15 rm "${a}__" "${b}__"
16 return $rv
17 }
18