Index: tests/regression/Selection/Atoms/AllAtoms/testsuite-selection-all-atoms.at
===================================================================
--- tests/regression/Selection/Atoms/AllAtoms/testsuite-selection-all-atoms.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AllAtoms/testsuite-selection-all-atoms.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -10,4 +10,10 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/post/allatoms.xyz], 0, [ignore], [ignore])
 
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All Atoms with Undo])
+AT_KEYWORDS([selection])
+
 file=allatoms.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/pre/box.xyz $file], 0)
@@ -15,4 +21,10 @@
 AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --undo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/post/box.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All Atoms with Redo])
+AT_KEYWORDS([selection])
 
 file=allatoms.xyz
@@ -34,4 +46,10 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/post/box.xyz], 0, [ignore], [ignore])
 
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All Atoms with Undo])
+AT_KEYWORDS([selection])
+
 file=id0_missing.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/pre/box.xyz $file], 0)
@@ -39,4 +57,10 @@
 AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id 0 --unselect-all-atoms --undo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtoms/post/id0_missing.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All Atoms with Redo])
+AT_KEYWORDS([selection])
 
 file=box.xyz
Index: tests/regression/Selection/Atoms/AllAtomsOfMolecule/testsuite-selection-all-atoms-of-molecule.at
===================================================================
--- tests/regression/Selection/Atoms/AllAtomsOfMolecule/testsuite-selection-all-atoms-of-molecule.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AllAtomsOfMolecule/testsuite-selection-all-atoms-of-molecule.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -3,4 +3,10 @@
 AT_SETUP([Selection - All atoms of selected molecules])
 AT_KEYWORDS([selection])
+
+file=molecule0.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 1 --select-molecules-atoms -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule0.xyz], 0, [ignore], [ignore])
 
 file=molecule1.xyz
@@ -10,21 +16,9 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
 
-file=molecule1.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/test.xyz], 0, [ignore], [ignore])
+AT_CLEANUP
 
-file=molecule1.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --undo --redo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
 
-file=molecule0.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 1 --select-molecules-atoms -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule0.xyz], 0, [ignore], [ignore])
+AT_SETUP([Selection - All atoms of selected molecules with Undo])
+AT_KEYWORDS([selection])
 
 file=molecule0.xyz
@@ -34,4 +28,16 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/test.xyz], 0, [ignore], [ignore])
 
+file=molecule1.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/test.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All atoms of selected molecules with Redo])
+AT_KEYWORDS([selection])
+
 file=molecule0.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
@@ -39,4 +45,10 @@
 AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 1 --select-molecules-atoms --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule0.xyz], 0, [ignore], [ignore])
+
+file=molecule1.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
 
 AT_CLEANUP
@@ -52,4 +64,16 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule0.xyz], 0, [ignore], [ignore])
 
+file=molecule1.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 1 --unselect-molecules-atoms -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms of selected molecules with Undo])
+AT_KEYWORDS([selection])
+
 file=molecule0.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
@@ -57,4 +81,16 @@
 AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 0 --unselect-molecules-atoms --undo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/empty.xyz], 0, [ignore], [ignore])
+
+file=molecule1.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 1 --unselect-molecules-atoms --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/empty.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms of selected molecules with Redo])
+AT_KEYWORDS([selection])
 
 file=molecule0.xyz
@@ -67,16 +103,4 @@
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
 AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 1 --unselect-molecules-atoms -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
-
-file=molecule1.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 1 --unselect-molecules-atoms --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/empty.xyz], 0, [ignore], [ignore])
-
-file=molecule1.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/pre/test.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 3 -I --select-all-atoms --select-molecule-by-id 1 --unselect-molecules-atoms --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AllAtomsOfMolecule/post/molecule1.xyz], 0, [ignore], [ignore])
Index: tests/regression/Selection/Atoms/AtomByElement/testsuite-selection-atoms-by-element.at
===================================================================
--- tests/regression/Selection/Atoms/AtomByElement/testsuite-selection-atoms-by-element.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AtomByElement/testsuite-selection-atoms-by-element.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -20,5 +20,5 @@
 
 
-AT_SETUP([Selection - All atoms with specific element by symbol with Undo/Redo])
+AT_SETUP([Selection - All atoms with specific element by symbol with Undo])
 AT_KEYWORDS([element,symbol])
 
@@ -35,4 +35,9 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test.xyz], 0, [ignore], [ignore])
 
+AT_CLEANUP
+
+AT_SETUP([Selection - All atoms with specific element by symbol with Redo])
+AT_KEYWORDS([element,symbol])
+
 file=test-H_missing.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz test-H_missing.xyz], 0)
Index: tests/regression/Selection/Atoms/AtomById/testsuite-selection-atom-by-id.at
===================================================================
--- tests/regression/Selection/Atoms/AtomById/testsuite-selection-atom-by-id.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AtomById/testsuite-selection-atom-by-id.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -12,9 +12,31 @@
   AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} -r], [], [ignore], [ignore])
   AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
-  # normal
+  ((i+=1))
+done
+AT_CLEANUP
+
+
+AT_SETUP([Selection - atom with specific id with Undo])
+AT_KEYWORDS([selection,id,atom])
+# go through all possible ids (0-7) and removed
+i=0
+while test $i -lt 8; do
+  file=id${i}_missing.xyz
+  # undo
   AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
   AT_CHECK([chmod u+w $file], 0)
   AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
   AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/test-undo.xyz])
+  ((i+=1))
+done
+AT_CLEANUP
+
+
+AT_SETUP([Selection - atom with specific id with Redo])
+AT_KEYWORDS([selection,id,atom])
+# go through all possible ids (0-7) and removed
+i=0
+while test $i -lt 8; do
+  file=id${i}_missing.xyz
   # redo
   AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
@@ -25,4 +47,5 @@
 done
 AT_CLEANUP
+
 
 AT_SETUP([Unselection - atom with specific id])
@@ -37,9 +60,31 @@
   AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} -r], [], [ignore], [ignore])
   AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
-  # normal
+  ((i+=1))
+done
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - atom with specific id with Undo])
+AT_KEYWORDS([selection,id,atom])
+# go through all possible ids (0-7) and remove others
+i=0
+while test $i -lt 8; do
+  file=id${i}_present.xyz
+  # undo
   AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
   AT_CHECK([chmod u+w $file], 0)
   AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
   AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/empty.xyz])
+  ((i+=1))
+done
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - atom with specific id with Redo])
+AT_KEYWORDS([selection,id,atom])
+# go through all possible ids (0-7) and remove others
+i=0
+while test $i -lt 8; do
+  file=id${i}_present.xyz
   # redo
   AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
Index: tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-atoms-inside-cuboid.at
===================================================================
--- tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-atoms-inside-cuboid.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-atoms-inside-cuboid.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -8,16 +8,4 @@
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
 
@@ -34,4 +22,29 @@
 
 
+AT_SETUP([Selection - All atoms inside cuboid with Undo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsoutsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All atoms inside cuboid with Redo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsoutsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
+
+
+AT_CLEANUP
+
+
 AT_SETUP([Selection - All atoms inside cuboid with defaults])
 AT_KEYWORDS([selection,cuboid])
@@ -41,16 +54,4 @@
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
 
@@ -67,4 +68,29 @@
 
 
+AT_SETUP([Selection - All atoms inside cuboid with defaults with Undo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsoutsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All atoms inside cuboid with defaults with Redo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsoutsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
+
+
+AT_CLEANUP
+
+
 AT_SETUP([Unselection - All atoms inside cuboid])
 AT_KEYWORDS([selection,cuboid])
@@ -74,16 +100,4 @@
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
-
-file=allatomsinsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
-
-file=allatomsinsidecuboid.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
 
@@ -98,2 +112,26 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms inside cuboid with Undo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsinsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms inside cuboid with Redo])
+AT_KEYWORDS([selection,cuboid])
+
+file=allatomsinsidecuboid.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-atoms-inside-sphere.at
===================================================================
--- tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-atoms-inside-sphere.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-atoms-inside-sphere.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -8,16 +8,4 @@
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidesphere.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore])
-
-file=allatomsoutsidesphere.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore])
 
@@ -34,4 +22,28 @@
 
 
+AT_SETUP([Selection - All atoms inside sphere with Undo])
+AT_KEYWORDS([selection,sphere])
+
+file=allatomsoutsidesphere.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All atoms inside sphere with Redo])
+AT_KEYWORDS([selection,sphere])
+
+file=allatomsoutsidesphere.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
 
 AT_SETUP([Unselection - All atoms inside sphere])
@@ -42,16 +54,4 @@
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
-
-file=allatomsinsidesphere.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore])
-
-file=allatomsinsidesphere.xyz
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
 
@@ -67,2 +67,25 @@
 AT_CLEANUP
 
+
+AT_SETUP([Unselection - All atoms inside sphere with Undo])
+AT_KEYWORDS([selection,sphere])
+
+file=allatomsinsidesphere.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms inside sphere with Redo])
+AT_KEYWORDS([selection,sphere])
+
+file=allatomsinsidesphere.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Selection/Atoms/ClearAtoms/testsuite-selection-clear-atoms.at
===================================================================
--- tests/regression/Selection/Atoms/ClearAtoms/testsuite-selection-clear-atoms.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Selection/Atoms/ClearAtoms/testsuite-selection-clear-atoms.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -10,4 +10,10 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/ClearAtoms/pre/box.xyz], 0, [ignore], [ignore])
 
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - clear atom selection with Undo])
+AT_KEYWORDS([selection,clear])
+
 file=id0_missing.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/ClearAtoms/pre/box.xyz $file], 0)
@@ -15,4 +21,10 @@
 AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id 0 --unselect-all-atoms --undo -r], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/ClearAtoms/post/id0_missing.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - clear atom selection with Redo])
+AT_KEYWORDS([selection,clear])
 
 file=box.xyz
