Index: tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at
===================================================================
--- tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at	(revision d70fffeeaa945095af732c68c3627ca366d9de9f)
+++ tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at	(revision d70fffeeaa945095af732c68c3627ca366d9de9f)
@@ -0,0 +1,91 @@
+### 3. (un)select molecules by formula
+
+
+AT_SETUP([Selection - Molecule by formula])
+AT_KEYWORDS([selection,molecule])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=water.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=ethanol.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=benzene.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - Molecule by formula with Undo])
+AT_KEYWORDS([selection,molecule])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=empty.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=empty.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=empty.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - Molecule by formula with Redo])
+AT_KEYWORDS([selection,molecule])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=water.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=ethanol.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula"
+srcfile=mix.xyz
+testfile=test.xyz
+targetfile=benzene.xyz
+AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
+AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
+
+AT_CLEANUP
