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
Index: tests/GuiChecks/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at
===================================================================
--- tests/GuiChecks/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at	(revision d50b9151219b75020931486afa73b2b92312849b)
+++ tests/GuiChecks/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
@@ -57,5 +57,4 @@
 
 AT_SETUP([Molecules - Rotate to PAS with Undo])
-AT_XFAIL_IF([/bin/true])
 AT_KEYWORDS([molecules rotate-to-principal-axis-system undo])
 
@@ -96,5 +95,4 @@
 
 AT_SETUP([Molecules - Rotate to PAS with Redo])
-AT_XFAIL_IF([/bin/true])
 AT_KEYWORDS([molecules rotate-to-principal-axis-system redo])
 
Index: tests/GuiChecks/Molecules/StretchBond/testsuite-molecules-stretch-bond-cyclic_bond.at
===================================================================
--- tests/GuiChecks/Molecules/StretchBond/testsuite-molecules-stretch-bond-cyclic_bond.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
+++ tests/GuiChecks/Molecules/StretchBond/testsuite-molecules-stretch-bond-cyclic_bond.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
@@ -0,0 +1,57 @@
+#
+#    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/>.
+#
+### stretching cyclic bond
+
+AT_SETUP([Molecules - Stretching cyclic bond])
+AT_KEYWORDS([molecules stretch-bond])
+
+file=benzene.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/pre/$file $file], 0)
+AT_CHECK([chmod +w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-id 2 3 --stretch-bond 2. --no-dry-run --store-session session-molecules-stretch-bond-cyclic_bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-stretch-bond-cyclic_bond.py >session-molecules-stretch-bond-cyclic_bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-stretch-bond-cyclic_bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Molecules - Stretching cyclic bond with Undo])
+AT_KEYWORDS([molecules stretch-bond undo])
+
+file=benzene.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/pre/$file $file], 0)
+AT_CHECK([chmod +w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-id 2 3 --stretch-bond 2. --undo --no-dry-run --store-session session-molecules-stretch-bond-cyclic_bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-stretch-bond-cyclic_bond.py >session-molecules-stretch-bond-cyclic_bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-stretch-bond-cyclic_bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/pre/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Molecules - Stretching cyclic bond with Redo])
+AT_KEYWORDS([molecules stretch-bond redo])
+
+file=benzene.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/pre/$file $file], 0)
+AT_CHECK([chmod +w $file], 0)
+AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-id 2 3 --stretch-bond 2. --undo --redo --no-dry-run --store-session session-molecules-stretch-bond-cyclic_bond.py --session-type python], 0, [stdout], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-molecules-stretch-bond-cyclic_bond.py >session-molecules-stretch-bond-cyclic_bond_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-molecules-stretch-bond-cyclic_bond_new.py], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/StretchBond/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/Molecules/testsuite-molecules.at
===================================================================
--- tests/GuiChecks/Molecules/testsuite-molecules.at	(revision d50b9151219b75020931486afa73b2b92312849b)
+++ tests/GuiChecks/Molecules/testsuite-molecules.at	(revision b10593f5a0f86f8e43ca8817e623d9b64a7c934e)
@@ -60,4 +60,7 @@
 m4_include([Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at])
 
+# rotate around one of its bond
+m4_include([Molecules/RotateAroundBond/testsuite-molecules-rotate-around-bond.at])
+
 # Rotate around origin
 m4_include([Molecules/RotateAroundOrigin/testsuite-molecules-rotate-around-origin.at])
@@ -68,4 +71,5 @@
 # stretch one of its bond
 m4_include([Molecules/StretchBond/testsuite-molecules-stretch-bond.at])
+m4_include([Molecules/StretchBond/testsuite-molecules-stretch-bond-cyclic_bond.at])
 
 # anneal forces by one step
