diff tests/include.sh @ 261:af8f6370c7a9 piper-nopiper

Update test fixtures for numerous off-by-one-nanosecond errors fixed recently in RealTime
author Chris Cannam
date Tue, 22 Nov 2016 11:57:21 +0000
parents 46d3a6461b4a
children bd6e98b348cf
line wrap: on
line diff
--- a/tests/include.sh	Mon Nov 21 17:08:34 2016 +0000
+++ b/tests/include.sh	Tue Nov 22 11:57:21 2016 +0000
@@ -72,6 +72,8 @@
     return $rv
 }
 
+SDIFF_WIDTH=140
+
 faildiff() {
     echo "Test failed: $1"
     if [ -n "$2" -a -n "$3" ]; then
@@ -79,13 +81,13 @@
 	echo "--"
 	cat "$2"
 	echo "--"
-	echo "Expected output follows:"
+	echo "Expected output follows ($3):"
 	echo "--"
 	cat "$3"
 	echo "--"
 	echo "Diff (output on left, expected on right):"
 	echo "--"
-	sdiff -w78 "$2" "$3"
+	sdiff -w${SDIFF_WIDTH} "$2" "$3"
 	echo "--"
     fi
     exit 1
@@ -98,14 +100,14 @@
 	echo "--"
 	od -c "$2"
 	echo "--"
-	echo "Expected output follows:"
+	echo "Expected output follows ($3):"
 	echo "--"
 	od -c "$3"
 	echo "--"
 	echo "Diff:"
 	echo "--"
 	od -w8 -c "$3" > "${3}__"
-	od -w8 -c "$2" | sdiff -w78 - "${3}__"
+	od -w8 -c "$2" | sdiff -w${SDIFF_WIDTH} - "${3}__"
 	rm "${3}__"
 	echo "--"
     fi