Index: tests/GuiChecks/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at
===================================================================
--- tests/GuiChecks/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/GuiChecks/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,34 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### adjacencymatcher helper
+
+AT_SETUP([Bond - AdjacencyMatcher])
+AT_KEYWORDS([Bond adjacencymatcher])
+
+# matches
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj], 0, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj], 0, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj], 0, [ignore], [ignore])
+
+# no matches
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj], 1, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/Bond/testsuite-bond.at
===================================================================
--- tests/GuiChecks/Bond/testsuite-bond.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/GuiChecks/Bond/testsuite-bond.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -25,2 +25,5 @@
 m4_include([Bond/Remove/testsuite-bond-remove.at])
 m4_include([Bond/Remove/testsuite-bond-remove_multiple.at])
+
+# adjacency matcher
+m4_include([Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at])
Index: tests/GuiChecks/Makefile.am
===================================================================
--- tests/GuiChecks/Makefile.am	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/GuiChecks/Makefile.am	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -157,4 +157,5 @@
 	$(srcdir)/./Bond/Remove/testsuite-bond-remove.at \
 	$(srcdir)/./Bond/testsuite-bond.at \
+	$(srcdir)/./Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at \
 	$(srcdir)/./Molecules/SaveBonds/testsuite-molecules-save-bonds.at \
 	$(srcdir)/./Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at \
Index: tests/GuiChecks/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at
===================================================================
--- tests/GuiChecks/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/GuiChecks/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -26,5 +26,5 @@
 AT_CHECK([grep -v "Command.*DryRun" session-molecules-save-adjacency.py >session-molecules-save-adjacency_new.py], 0, [ignore], [ignore])
 AT_CHECK([../../molecuilderguitest session-molecules-save-adjacency_new.py], 0, [stdout], [stderr])
-AT_CHECK([file=test.adj; diff $file ${abs_top_srcdir}/tests/regression/Molecules/SaveAdjacency/post/test.adj], 0, [ignore], [ignore])
+AT_CHECK([file=test.adj; ../../adjacencymatcher $file $file ${abs_top_srcdir}/tests/regression/Molecules/SaveAdjacency/post/$file], 0, [ignore], [ignore])
 
 AT_CLEANUP
Index: tests/GuiChecks/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at
===================================================================
--- tests/GuiChecks/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/GuiChecks/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -18,5 +18,5 @@
 ### trianglematcher helper
 
-AT_SETUP([Tesselation - TriangleMather])
+AT_SETUP([Tesselation - TriangleMatcher])
 AT_KEYWORDS([Tesselation trianglematcher])
 
Index: tests/GuiChecks/adjacencymatcher.in
===================================================================
--- tests/GuiChecks/adjacencymatcher.in	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/GuiChecks/adjacencymatcher.in	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# wrapper for testing with adjacencymatcher
+
+. ../../atlocal
+
+if test ! -z ${valgrind}
+then
+G_SLICE=always-malloc G_DEBUG=gc-friendly \
+libtool --mode=execute \
+${valgrind} -v \
+--log-file=valgrind.log \
+--xml=yes \
+--xml-file=valgrind.err \
+--time-stamp=yes \
+--error-exitcode=255 \
+--leak-check=full \
+--leak-resolution=high \
+--num-callers=20 \
+--track-origins=yes \
+--show-reachable=yes \
+"${AUTOTEST_PATH}/Bond/AdjacencyMatcher/adjacencymatcher" \
+${1+"$@"}
+else
+"${AUTOTEST_PATH}/Bond/AdjacencyMatcher/adjacencymatcher" \
+${1+"$@"}
+fi
+
+status=$?
+
+exit $status
Index: tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj
===================================================================
--- tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,9 @@
+1 9
+2 9
+3 9
+4 10
+6 11
+7 11
+9 1 2 3 10
+10 4 5 9
+11 10 6 7 8
Index: tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj
===================================================================
--- tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,11 @@
+1 9
+2 9
+3 9
+4 10
+5 10
+6 11
+7 11
+8 11
+9 2 3 10
+10 11 4 5 9
+11 10 6 7 8
Index: tests/regression/Bond/AdjacencyMatcher/pre/test.adj
===================================================================
--- tests/regression/Bond/AdjacencyMatcher/pre/test.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/Bond/AdjacencyMatcher/pre/test.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,11 @@
+1 9
+2 9
+3 9
+4 10
+5 10
+6 11
+7 11
+8 11
+9 1 2 3 10
+10 11 4 5 9
+11 10 6 7 8
Index: tests/regression/Bond/AdjacencyMatcher/pre/test2.adj
===================================================================
--- tests/regression/Bond/AdjacencyMatcher/pre/test2.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/Bond/AdjacencyMatcher/pre/test2.adj	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,12 @@
+1 9
+2 9
+3 9
+4 10
+5 10
+6 11
+7 11
+8 11
+9 1 2 3 10
+10 4 5 9 11
+11 6 7 8 10
+
Index: tests/regression/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at
===================================================================
--- tests/regression/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,34 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### adjacencymatcher helper
+
+AT_SETUP([Bond - AdjacencyMatcher])
+AT_KEYWORDS([Bond adjacencymatcher])
+
+# matches
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj], 0, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj], 0, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj], 0, [ignore], [ignore])
+
+# no matches
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal.adj], 1, [ignore], [ignore])
+AT_CHECK([../../adjacencymatcher ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/test2.adj ${abs_top_srcdir}/tests/regression/Bond/AdjacencyMatcher/pre/notequal2.adj], 1, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Bond/testsuite-bond.at
===================================================================
--- tests/regression/Bond/testsuite-bond.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/regression/Bond/testsuite-bond.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -25,2 +25,5 @@
 m4_include([Bond/Remove/testsuite-bond-remove.at])
 m4_include([Bond/Remove/testsuite-bond-remove_multiple.at])
+
+# adjacency matcher
+m4_include([Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at])
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/regression/Makefile.am	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -50,4 +50,5 @@
 	$(srcdir)/Bond/Remove/testsuite-bond-remove.at \
 	$(srcdir)/Bond/Remove/testsuite-bond-remove_multiple.at \
+	$(srcdir)/Bond/AdjacencyMatcher/testsuite-bond-adjacencymatcher.at \
 	$(srcdir)/Analysis/testsuite-analysis.at \
 	$(srcdir)/Analysis/DipoleAngularCorrelation/testsuite-analysis-dipole-angular-correlation.at \
Index: tests/regression/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at
===================================================================
--- tests/regression/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/regression/Molecules/SaveAdjacency/testsuite-molecules-save-adjacency.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -24,5 +24,5 @@
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/SaveAdjacency/pre/test.conf $file], 0)
 AT_CHECK([../../molecuilder -i $file  -v 1 --select-all-atoms --create-adjacency --select-molecule-by-id 0 -J test.adj], 0, [stdout], [stderr])
-AT_CHECK([file=test.adj; diff $file ${abs_top_srcdir}/tests/regression/Molecules/SaveAdjacency/post/test.adj], 0, [ignore], [ignore])
+AT_CHECK([file=test.adj; ../../adjacencymatcher $file $file ${abs_top_srcdir}/tests/regression/Molecules/SaveAdjacency/post/$file], 0, [ignore], [ignore])
 
 AT_CLEANUP
Index: tests/regression/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at
===================================================================
--- tests/regression/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at	(revision f7054cab5c6c0b7c73d7b4866501383e989b50da)
+++ tests/regression/Tesselation/TriangleMatcher/testsuite-tesselation-trianglematcher.at	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -18,5 +18,5 @@
 ### trianglematcher helper
 
-AT_SETUP([Tesselation - TriangleMather])
+AT_SETUP([Tesselation - TriangleMatcher])
 AT_KEYWORDS([Tesselation trianglematcher])
 
Index: tests/regression/adjacencymatcher.in
===================================================================
--- tests/regression/adjacencymatcher.in	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
+++ tests/regression/adjacencymatcher.in	(revision c66ae6684084ff864820af9b907d9f3b9725530d)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# wrapper for testing with adjacencymatcher
+
+. ../../atlocal
+
+if test ! -z ${valgrind}
+then
+G_SLICE=always-malloc G_DEBUG=gc-friendly \
+libtool --mode=execute \
+${valgrind} -v \
+--log-file=valgrind.log \
+--xml=yes \
+--xml-file=valgrind.err \
+--time-stamp=yes \
+--error-exitcode=255 \
+--leak-check=full \
+--leak-resolution=high \
+--num-callers=20 \
+--track-origins=yes \
+--show-reachable=yes \
+"${AUTOTEST_PATH}/Bond/AdjacencyMatcher/adjacencymatcher" \
+${1+"$@"}
+else
+"${AUTOTEST_PATH}/Bond/AdjacencyMatcher/adjacencymatcher" \
+${1+"$@"}
+fi
+
+status=$?
+
+exit $status
