Description: This patch adds regression tests to check the
 admesh functionality after building. It generates with newly
 created admesh-binary some files and compares it with previously
 genereted ones. If files are not identical, build-process
 terminates with an error.
Author: Anton Gladky <gladky.anton@gmail.com>
Last-Update: 2011-02-06

Index: admesh/regression_test/regression_test_output_etalon
===================================================================
--- /dev/null
+++ admesh/regression_test/regression_test_output_etalon
@@ -0,0 +1,36 @@
+ADMesh version 0.98.1, Copyright (C) 1995, 1996 Anthony D. Martin
+ADMesh comes with NO WARRANTY.  This is free software, and you are welcome to
+redistribute it under certain conditions.  See the file COPYING for details.
+Opening block.stl
+Checking exact...
+All facets connected.  No nearby check necessary.
+No unconnected need to be removed.
+No holes need to be filled.
+Checking normal directions...
+Checking normal values...
+Calculating volume...
+Verifying neighbors...
+
+================= Results produced by ADMesh version 0.98.1 ================
+Input file         : block.stl
+File type          : ASCII STL file
+Header             : SOLID  Untitled1
+============== Size ==============
+Min X = -1.968504, Max X =  1.968504
+Min Y = -1.968504, Max Y =  1.968504
+Min Z = -1.968504, Max Z =  1.968504
+========= Facet Status ========== Original ============ Final ====
+Number of facets                 :    12                  12
+Facets with 1 disconnected edge  :     0                   0
+Facets with 2 disconnected edges :     0                   0
+Facets with 3 disconnected edges :     0                   0
+Total disconnected facets        :     0                   0
+=== Processing Statistics ===     ===== Other Statistics =====
+Number of parts       :     1        Volume   :  61.023746
+Degenerate facets     :     0
+Edges fixed           :     0
+Facets removed        :     0
+Facets added          :     0
+Facets reversed       :     0
+Backwards edges       :     0
+Normals fixed         :     0
Index: admesh/regression_test/regression_test
===================================================================
--- /dev/null
+++ admesh/regression_test/regression_test
@@ -0,0 +1,14 @@
+#!/bin/dash
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./.libs/
+
+.libs/admesh block.stl > regression_test_output_current
+DIFFRESULT=`diff regression_test_output_current regression_test/regression_test_output_etalon`
+if [ "$DIFFRESULT" != "" ]; then
+  rm regression_test_output_current
+	echo 'Regression test FAILED!'
+	exit 1
+else
+	rm regression_test_output_current
+  echo "Regression test PASSED!"
+	exit 0
+fi
