diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-include.sh	Fri Oct 09 09:13:21 2009 +0000
@@ -0,0 +1,18 @@
+
+fail() {
+    echo "Test failed: $1"
+    exit 1
+}
+
+csvcompare() {
+    # permit some fuzz in final few digits
+    a="$1"
+    b="$2"
+    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__"
+    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__"
+    cmp -s "${a}__" "${b}__"
+    rv=$?
+    rm "${a}__" "${b}__"
+    return $rv
+}
+