Index: tests/GuiChecks/Molecules/RotateAroundBond/testsuite-molecules-rotate-around-bond.at
===================================================================
--- tests/GuiChecks/Molecules/RotateAroundBond/testsuite-molecules-rotate-around-bond.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
+++ tests/GuiChecks/Molecules/RotateAroundBond/testsuite-molecules-rotate-around-bond.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
@@ -0,0 +1,116 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2017 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/>.
+#
+### Rotate around bond
+
+AT_SETUP([Molecules - Rotate around bond])
+AT_KEYWORDS([molecules rotate-around-bond])
+
+file=test-90-true.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+file=test-195-true.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 195. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+file=test-95-false.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around bond with Undo])
+AT_KEYWORDS([molecules rotate-around-bond undo])
+
+file=test.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --undo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
+
+file=test-95-false.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*'  $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around bond with Redo])
+AT_KEYWORDS([molecules rotate-around-bond redo])
+
+file=test-90-true.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --undo --redo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+file=test-95-false.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo --redo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Molecules - Rotate around bond fails for cycles])
+AT_KEYWORDS([molecules rotate-around-bond cycle])
+
+file=test_cycle.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test_cycle.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-id 1 2 --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 5, [stdout], [stderr])
+
+AT_CLEANUP
+
+AT_SETUP([Molecules - Rotate around bond on almost complete cycle])
+AT_KEYWORDS([molecules rotate-around-bond])
+
+file=benzene_90degree.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/benzene.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-order -1 -6 --remove-atom --select-atom-by-id 3 5 --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
