summaryrefslogtreecommitdiff
path: root/test/comp
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-02 11:00:08 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-02 11:00:08 -0300
commit8745b40e3eb216fc5cfa7373fea3b4ae991f1c3e (patch)
treeeab2aa7ec1941bd3da99f1dbcf64eab04d34667a /test/comp
downloadeeshow-8745b40e3eb216fc5cfa7373fea3b4ae991f1c3e.tar.gz
eeshow-8745b40e3eb216fc5cfa7373fea3b4ae991f1c3e.tar.bz2
eeshow-8745b40e3eb216fc5cfa7373fea3b4ae991f1c3e.zip
rename sch2fig to eeshow
Diffstat (limited to 'test/comp')
-rwxr-xr-xtest/comp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/comp b/test/comp
new file mode 100755
index 0000000..b406607
--- /dev/null
+++ b/test/comp
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+usage()
+{
+ echo "usage: $0 [dir]" 1>&2
+ exit 1
+}
+
+
+[ "$2" ] && usage
+[ "${1#-}" != "$1" ] && usage
+
+dir=${1:-.}
+
+diffs=0
+rm -f $dir/_diff*png
+for n in $dir/out*.png; do
+ out=`basename "$n"`
+ ref=$dir/ref${out#out}
+ diff=$dir/_diff${out#out}
+ if ! compare -metric AE $ref $n - >/dev/null; then
+ diffs=`expr $diffs + 1`
+ compare -metric AE $ref $n $diff
+ fi
+done
+echo
+[ $diffs = 0 ] && exit 0
+echo "$diffs difference(s)" 1>&2
+exit 1