Changeset 7c958e for tests/regression
- Timestamp:
- Sep 21, 2011, 8:40:59 PM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d70fff
- Parents:
- 93eb00
- git-author:
- Frederik Heber <heber@…> (04/27/11 17:02:43)
- git-committer:
- Frederik Heber <heber@…> (09/21/11 20:40:59)
- Location:
- tests/regression
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/regression/Makefile.am
r93eb00 r7c958e 4 4 $(TESTSUITE) \ 5 5 atlocal.in \ 6 CheckCommand.sh \7 6 molecuilder.in \ 8 7 package.m4 \ -
tests/regression/Selection/Molecules/AllMolecules/testsuite-selection-all-molecules.at
r93eb00 r7c958e 4 4 AT_SETUP([Selection - All Molecules]) 5 5 AT_KEYWORDS([selection,molecule]) 6 # some variables before 7 srcpath="Selection/Molecules/AllMolecules"6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 8 8 srcfile=box.xyz 9 m4_include(CheckCommand.sh) 10 # the tests 11 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules -s box.xyz" 12 mv box.xyz box_a.xyz 13 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-all-molecules --undo -s empty.xyz" 14 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --undo --redo -s box.xyz" 15 mv box.xyz box_b.xyz 16 AT_CHECK([diff -I '.*Created by molecuilder.*' box_a.xyz box_b.xyz], 0, [ignore], [ignore]) 9 testfile=test.xyz 10 targetfile=box.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 14 17 15 AT_CLEANUP 16 17 18 AT_SETUP([Selection - All Molecules with Undo]) 19 AT_KEYWORDS([selection,molecule]) 20 21 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 22 srcfile=box.xyz 23 testfile=test.xyz 24 targetfile=empty.xyz 25 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 26 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --undo -s $targetfile], 0, [stdout], [stderr]) 27 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 28 29 AT_CLEANUP 30 31 32 AT_SETUP([Selection - All Molecules with Redo]) 33 AT_KEYWORDS([selection,molecule]) 34 35 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 36 srcfile=box.xyz 37 testfile=test.xyz 38 targetfile=box.xyz 39 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 40 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --undo --redo -s $targetfile], 0, [stdout], [stderr]) 41 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 42 43 AT_CLEANUP 44 18 45 19 46 AT_SETUP([Unselection - All Molecules]) 20 47 AT_KEYWORDS([selection,molecule]) 21 # some variables before 22 srcpath="Selection/Molecules/AllMolecules"48 49 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 23 50 srcfile=box.xyz 24 m4_include(CheckCommand.sh) 25 # the tests 26 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-all-molecules --unselect-all-molecules -s empty.xyz" 27 mv empty.xyz empty_a.xyz 28 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --unselect-all-molecules --undo -s box.xyz" 29 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-all-molecules --unselect-all-molecules --undo --redo -s empty.xyz" 30 mv empty.xyz empty_b.xyz 31 AT_CHECK([diff -I '.*Created by molecuilder.*' empty_a.xyz empty_b.xyz], 0, [ignore], [ignore]) 51 testfile=test.xyz 52 targetfile=empty.xyz 53 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 54 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-all-molecules -s $targetfile], 0, [stdout], [stderr]) 55 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 56 32 57 AT_CLEANUP 58 59 60 AT_SETUP([Unselection - All Molecules with Undo]) 61 AT_KEYWORDS([selection,molecule]) 62 63 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 64 srcfile=box.xyz 65 testfile=test.xyz 66 targetfile=box.xyz 67 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 68 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-all-molecules --undo -s $targetfile], 0, [stdout], [stderr]) 69 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 70 71 AT_CLEANUP 72 73 74 AT_SETUP([Unselection - All Molecules with Redo]) 75 AT_KEYWORDS([selection,molecule]) 76 77 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/AllMolecules" 78 srcfile=box.xyz 79 testfile=test.xyz 80 targetfile=empty.xyz 81 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 82 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-all-molecules --undo --redo -s $targetfile], 0, [stdout], [stderr]) 83 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 84 85 AT_CLEANUP -
tests/regression/Selection/Molecules/ClearMolecules/testsuite-selection-clear-molecules.at
r93eb00 r7c958e 1 1 ### 2. clear molecule selection 2 2 3 AT_SETUP([Selection - clear]) 3 4 AT_SETUP([Selection - Clear molecule selection]) 4 5 AT_KEYWORDS([selection,molecule]) 5 # some variables before 6 srcpath="Selection/Molecules/ClearMolecules"6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/ClearMolecules" 7 8 srcfile=box.xyz 8 m4_include(CheckCommand.sh) 9 # the tests 10 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-all-molecules --clear-molecule-selection -s empty.xyz" 11 mv empty.xyz empty_a.xyz 12 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --clear-molecule-selection --undo -s box.xyz" 13 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-all-molecules --clear-molecule-selection --undo --redo -s empty.xyz" 14 mv empty.xyz empty_b.xyz 15 AT_CHECK([diff -I '.*Created by molecuilder.*' empty_a.xyz empty_b.xyz], 0, [ignore], [ignore]) 9 testfile=test.xyz 10 targetfile=empty.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --clear-molecule-selection -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 14 16 15 AT_CLEANUP 16 17 18 AT_SETUP([Selection - Clear molecule selection with Undo]) 19 AT_KEYWORDS([selection,molecule]) 20 21 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/ClearMolecules" 22 srcfile=box.xyz 23 testfile=test.xyz 24 targetfile=box.xyz 25 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 26 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --clear-molecule-selection --undo -s $targetfile], 0, [stdout], [stderr]) 27 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 28 29 AT_CLEANUP 30 31 32 AT_SETUP([Selection - Clear molecule selection with Redo]) 33 AT_KEYWORDS([selection,molecule]) 34 35 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/ClearMolecules" 36 srcfile=box.xyz 37 testfile=test.xyz 38 targetfile=empty.xyz 39 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 40 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --clear-molecule-selection --undo --redo -s $targetfile], 0, [stdout], [stderr]) 41 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 42 43 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-molecules-by-formula.at
r93eb00 r7c958e 2 2 3 3 4 AT_SETUP([Selection - Molecule sby formula])4 AT_SETUP([Selection - Molecule by formula]) 5 5 AT_KEYWORDS([selection,molecule]) 6 # some variables before 7 srcpath="Selection/Molecules/MoleculeByFormula"6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 8 8 srcfile=mix.xyz 9 m4_include(CheckCommand.sh) 10 # the tests 11 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecules-by-formula H2O -s water.xyz" 12 mv water.xyz water_a.xyz 13 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula H2O --undo -s empty.xyz" 14 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecules-by-formula H2O --undo --redo -s water.xyz" 15 mv water.xyz water_b.xyz 16 AT_CHECK([diff -I '.*Created by molecuilder.*' water_a.xyz water_b.xyz], 0, [ignore], [ignore]) 9 testfile=test.xyz 10 targetfile=water.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 17 14 18 check_command_output $srcpath $srcfile "ethanol.xyz" "-I --select-molecules-by-formula C2H5(OH) -s ethanol.xyz" 19 mv ethanol.xyz ethanol_a.xyz 20 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula C2H5(OH) --undo -s empty.xyz" 21 check_command_output $srcpath $srcfile "ethanol.xyz" "-I --select-molecules-by-formula C2H5(OH) --undo --redo -s ethanol.xyz" 22 mv ethanol.xyz ethanol_b.xyz 23 AT_CHECK([diff -I '.*Created by molecuilder.*' ethanol_a.xyz ethanol_b.xyz], 0, [ignore], [ignore]) 15 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 16 srcfile=mix.xyz 17 testfile=test.xyz 18 targetfile=ethanol.xyz 19 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 20 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr]) 21 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 24 22 25 check_command_output $srcpath $srcfile "benzene.xyz" "-I --select-molecules-by-formula C6H6 -s benzene.xyz" 26 mv benzene.xyz benzene_a.xyz 27 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula C6H6 --undo -s empty.xyz" 28 check_command_output $srcpath $srcfile "benzene.xyz" "-I --select-molecules-by-formula C6H6 --undo --redo -s benzene.xyz" 29 mv benzene.xyz benzene_b.xyz 30 AT_CHECK([diff -I '.*Created by molecuilder.*' benzene_a.xyz benzene_b.xyz], 0, [ignore], [ignore]) 23 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 24 srcfile=mix.xyz 25 testfile=test.xyz 26 targetfile=benzene.xyz 27 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 28 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr]) 29 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 30 31 31 AT_CLEANUP 32 32 33 AT_SETUP([Unselection - Molecules by formula]) 33 34 AT_SETUP([Selection - Molecule by formula with Undo]) 34 35 AT_KEYWORDS([selection,molecule]) 35 # some variables before 36 srcpath="Selection/Molecules/MoleculeByFormula"36 37 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 37 38 srcfile=mix.xyz 38 m4_include(CheckCommand.sh) 39 # the tests 40 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O -s water_missing.xyz" 41 mv water_missing.xyz water_missing_a.xyz 42 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s mix.xyz" 43 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s water_missing.xyz" 44 mv water_missing.xyz water_missing_b.xyz 45 AT_CHECK([diff -I '.*Created by molecuilder.*' water_missing_a.xyz water_missing_b.xyz], 0, [ignore], [ignore]) 39 testfile=test.xyz 40 targetfile=empty.xyz 41 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr]) 43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 46 44 47 check_command_output $srcpath $srcfile "ethanol_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) -s ethanol_missing.xyz" 48 mv ethanol_missing.xyz ethanol_missing_a.xyz 49 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) --undo -s mix.xyz" 50 check_command_output $srcpath $srcfile "ethanol_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) --undo --redo -s ethanol_missing.xyz" 51 mv ethanol_missing.xyz ethanol_missing_b.xyz 52 AT_CHECK([diff -I '.*Created by molecuilder.*' ethanol_missing_a.xyz ethanol_missing_b.xyz], 0, [ignore], [ignore]) 45 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 46 srcfile=mix.xyz 47 testfile=test.xyz 48 targetfile=empty.xyz 49 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 50 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr]) 51 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 53 52 54 check_command_output $srcpath $srcfile "benzene_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 -s benzene_missing.xyz" 55 mv benzene_missing.xyz benzene_missing_a.xyz 56 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s mix.xyz" 57 check_command_output $srcpath $srcfile "benzene_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s benzene_missing.xyz" 58 mv benzene_missing.xyz benzene_missing_b.xyz 59 AT_CHECK([diff -I '.*Created by molecuilder.*' benzene_missing_a.xyz benzene_missing_b.xyz], 0, [ignore], [ignore]) 53 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 54 srcfile=mix.xyz 55 testfile=test.xyz 56 targetfile=empty.xyz 57 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 58 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr]) 59 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 60 60 61 AT_CLEANUP 62 63 64 AT_SETUP([Selection - Molecule by formula with Redo]) 65 AT_KEYWORDS([selection,molecule]) 66 67 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 68 srcfile=mix.xyz 69 testfile=test.xyz 70 targetfile=water.xyz 71 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 72 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr]) 73 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 74 75 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 76 srcfile=mix.xyz 77 testfile=test.xyz 78 targetfile=ethanol.xyz 79 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 80 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 81 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 82 83 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 84 srcfile=mix.xyz 85 testfile=test.xyz 86 targetfile=benzene.xyz 87 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 88 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 89 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 90 91 AT_CLEANUP 92 93 94 AT_SETUP([Unselection - Molecule by formula]) 95 AT_KEYWORDS([selection,molecule]) 96 97 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 98 srcfile=mix.xyz 99 testfile=test.xyz 100 targetfile=water_missing.xyz 101 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 102 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr]) 103 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 104 105 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 106 srcfile=mix.xyz 107 testfile=test.xyz 108 targetfile=ethanol_missing.xyz 109 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 110 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr]) 111 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 112 113 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 114 srcfile=mix.xyz 115 testfile=test.xyz 116 targetfile=benzene_missing.xyz 117 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 118 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr]) 119 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 120 121 AT_CLEANUP 122 123 124 AT_SETUP([Unselection - Molecule by formula with Undo]) 125 AT_KEYWORDS([selection,molecule]) 126 127 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 128 srcfile=mix.xyz 129 testfile=test.xyz 130 targetfile=mix.xyz 131 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 132 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr]) 133 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 134 135 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 136 srcfile=mix.xyz 137 testfile=test.xyz 138 targetfile=mix.xyz 139 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 140 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr]) 141 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 142 143 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 144 srcfile=mix.xyz 145 testfile=test.xyz 146 targetfile=mix.xyz 147 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 148 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr]) 149 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 150 151 AT_CLEANUP 152 153 154 AT_SETUP([Unselection - Molecule by formula with Redo]) 155 AT_KEYWORDS([selection,molecule]) 156 157 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 158 srcfile=mix.xyz 159 testfile=test.xyz 160 targetfile=water_missing.xyz 161 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 162 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr]) 163 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 164 165 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 166 srcfile=mix.xyz 167 testfile=test.xyz 168 targetfile=ethanol_missing.xyz 169 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 170 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 171 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 172 173 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 174 srcfile=mix.xyz 175 testfile=test.xyz 176 targetfile=benzene_missing.xyz 177 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 178 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 179 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 180 181 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeById/testsuite-selection-molecule-by-id.at
r93eb00 r7c958e 4 4 AT_SETUP([Selection - Molecule by id]) 5 5 AT_KEYWORDS([selection,molecule]) 6 # some variables before 7 srcpath="Selection/Molecules/MoleculeById"6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 8 8 srcfile=box.xyz 9 m4_include(CheckCommand.sh) 10 # the tests 11 check_command_output $srcpath $srcfile "water_id4.xyz" "-I --select-molecule-by-id 4 -s water_id4.xyz" 12 mv water_id4.xyz water_id4_a.xyz 13 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-id 4 --undo -s empty.xyz" 14 check_command_output $srcpath $srcfile "water_id4.xyz" "-I --select-molecule-by-id 4 --undo --redo -s water_id4.xyz" 15 mv water_id4.xyz water_id4_b.xyz 16 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id4_a.xyz water_id4_b.xyz], 0, [ignore], [ignore]) 9 testfile=test.xyz 10 targetfile=water_id4.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 4 -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 14 17 15 AT_CLEANUP 16 17 18 AT_SETUP([Selection - Molecule by id with Undo]) 19 AT_KEYWORDS([selection,molecule]) 20 21 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 22 srcfile=box.xyz 23 testfile=test.xyz 24 targetfile=empty.xyz 25 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 26 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 4 --undo -s $targetfile], 0, [stdout], [stderr]) 27 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 28 29 AT_CLEANUP 30 31 32 AT_SETUP([Selection - Molecule by id with Redo]) 33 AT_KEYWORDS([selection,molecule]) 34 35 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 36 srcfile=box.xyz 37 testfile=test.xyz 38 targetfile=water_id4.xyz 39 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 40 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 4 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 41 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 42 43 AT_CLEANUP 44 18 45 19 46 AT_SETUP([Unselection - Molecule by id]) 20 47 AT_KEYWORDS([selection,molecule]) 21 # some variables before 22 srcpath="Selection/Molecules/MoleculeById"48 49 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 23 50 srcfile=box.xyz 24 m4_include(CheckCommand.sh) 25 # the tests 26 check_command_output $srcpath $srcfile "id4_missing.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 -s id4_missing.xyz" 27 mv id4_missing.xyz id4_missing_a.xyz 28 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 --undo -s box.xyz" 29 check_command_output $srcpath $srcfile "id4_missing.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 --undo --redo -s id4_missing.xyz" 30 mv id4_missing.xyz id4_missing_b.xyz 31 AT_CHECK([diff -I '.*Created by molecuilder.*' id4_missing_a.xyz id4_missing_b.xyz], 0, [ignore], [ignore]) 51 testfile=test.xyz 52 targetfile=id4_missing.xyz 53 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 54 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-id 4 -s $targetfile], 0, [stdout], [stderr]) 55 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 56 32 57 AT_CLEANUP 58 59 60 AT_SETUP([Unselection - Molecule by id with Undo]) 61 AT_KEYWORDS([selection,molecule]) 62 63 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 64 srcfile=box.xyz 65 testfile=test.xyz 66 targetfile=box.xyz 67 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 68 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-id 4 --undo -s $targetfile], 0, [stdout], [stderr]) 69 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 70 71 AT_CLEANUP 72 73 74 AT_SETUP([Unselection - Molecule by id with Redo]) 75 AT_KEYWORDS([selection,molecule]) 76 77 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeById" 78 srcfile=box.xyz 79 testfile=test.xyz 80 targetfile=id4_missing.xyz 81 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 82 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-id 4 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 83 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 84 85 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByName/testsuite-selection-molecules-by-name.at
r93eb00 r7c958e 3 3 AT_SETUP([Selection - Molecules by name]) 4 4 AT_KEYWORDS([selection,molecule]) 5 # some variables before 6 srcpath="Selection/Molecules/MoleculeByName"5 6 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 7 7 srcfile=test.xyz 8 m4_include(CheckCommand.sh) 9 # the tests 10 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name water -s water.xyz" 11 mv water.xyz water_a.xyz 12 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name water --undo -s empty.xyz" 13 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name water --undo --redo -s water.xyz" 14 mv water.xyz water_b.xyz 15 AT_CHECK([diff -I '.*Created by molecuilder.*' water_a.xyz water_b.xyz], 0, [ignore], [ignore]) 8 testfile=test.xyz 9 targetfile=water.xyz 10 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 11 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name \"water\" -s $targetfile], 0, [stdout], [stderr]) 12 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 13 16 14 AT_CLEANUP 15 16 17 AT_SETUP([Selection - Molecules by name with Undo]) 18 AT_KEYWORDS([selection,molecule]) 19 20 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 21 srcfile=test.xyz 22 testfile=test.xyz 23 targetfile=empty.xyz 24 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 25 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name \"water\" --undo -s $targetfile], 0, [stdout], [stderr]) 26 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 27 28 AT_CLEANUP 29 30 31 AT_SETUP([Selection - Molecules by name with Redo]) 32 AT_KEYWORDS([selection,molecule]) 33 34 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 35 srcfile=test.xyz 36 testfile=test.xyz 37 targetfile=water.xyz 38 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 39 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecule-by-id 0 --select-molecules-by-name \"water\" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 40 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 41 42 AT_CLEANUP 43 17 44 18 45 AT_SETUP([Unselection - Molecules by name]) 19 46 AT_KEYWORDS([selection,molecule]) 20 # some variables before 21 srcpath="Selection/Molecules/MoleculeByName"47 48 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 22 49 srcfile=test.xyz 23 m4_include(CheckCommand.sh) 24 # the tests 25 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name water -s empty.xyz" 26 mv empty.xyz empty_a.xyz 27 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name water --undo -s water.xyz" 28 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name water --undo --redo -s empty.xyz" 29 mv empty.xyz empty_b.xyz 30 AT_CHECK([diff -I '.*Created by molecuilder.*' empty_a.xyz empty_b.xyz], 0, [ignore], [ignore]) 50 testfile=test.xyz 51 targetfile=empty.xyz 52 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 53 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name \"water\" -s $targetfile], 0, [stdout], [stderr]) 54 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 55 31 56 AT_CLEANUP 57 58 59 AT_SETUP([Unselection - Molecules by name with Undo]) 60 AT_KEYWORDS([selection,molecule]) 61 62 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 63 srcfile=test.xyz 64 testfile=test.xyz 65 targetfile=water.xyz 66 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 67 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name \"water\" --undo -s $targetfile], 0, [stdout], [stderr]) 68 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 69 70 AT_CLEANUP 71 72 73 AT_SETUP([Unselection - Molecules by name with Redo]) 74 AT_KEYWORDS([selection,molecule]) 75 76 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByName" 77 srcfile=test.xyz 78 testfile=test.xyz 79 targetfile=empty.xyz 80 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 81 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 0 --change-molname \"water\" --unselect-molecules-by-name \"water\" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 82 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 83 84 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeByOrder/testsuite-selection-molecule-by-order.at
r93eb00 r7c958e 4 4 AT_SETUP([Selection - Molecule by order, forward]) 5 5 AT_KEYWORDS([selection,molecule]) 6 # some variables before 7 srcpath="Selection/Molecules/MoleculeByOrder" 8 srcfile=twowater.xyz 9 m4_include(CheckCommand.sh) 10 # the tests 11 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 -s water_id0.xyz" 12 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 -s water_id1.xyz" 13 mv water_id0.xyz water_id0_a.xyz 14 mv water_id1.xyz water_id1_a.xyz 15 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 1 --undo -s empty.xyz" 16 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 2 --undo -s empty.xyz" 17 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 --undo --redo -s water_id0.xyz" 18 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 --undo --redo -s water_id1.xyz" 19 mv water_id0.xyz water_id0_b.xyz 20 mv water_id1.xyz water_id1_b.xyz 21 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) 22 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) 23 AT_CLEANUP 6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 8 srcfile=twowater.xyz 9 testfile=test.xyz 10 targetfile=water_id0.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 1 -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 14 15 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 16 srcfile=twowater.xyz 17 testfile=test.xyz 18 targetfile=water_id1.xyz 19 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 20 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 2 -s $targetfile], 0, [stdout], [stderr]) 21 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 22 23 AT_CLEANUP 24 25 26 AT_SETUP([Selection - Molecule by order, forward with Undo]) 27 AT_KEYWORDS([selection,molecule]) 28 29 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 30 srcfile=twowater.xyz 31 testfile=test.xyz 32 targetfile=empty.xyz 33 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 34 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 1 --undo -s $targetfile], 0, [stdout], [stderr]) 35 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 36 37 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 38 srcfile=twowater.xyz 39 testfile=test.xyz 40 targetfile=empty.xyz 41 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 2 --undo -s $targetfile], 0, [stdout], [stderr]) 43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 44 45 AT_CLEANUP 46 47 48 AT_SETUP([Selection - Molecule by order, forward with Redo]) 49 AT_KEYWORDS([selection,molecule]) 50 51 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 52 srcfile=twowater.xyz 53 testfile=test.xyz 54 targetfile=water_id0.xyz 55 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 56 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 1 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 57 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 58 59 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 60 srcfile=twowater.xyz 61 testfile=test.xyz 62 targetfile=water_id1.xyz 63 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 64 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order 2 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 65 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 66 67 AT_CLEANUP 68 24 69 25 70 AT_SETUP([Selection - Molecule by order, backward]) 26 71 AT_KEYWORDS([selection,molecule]) 27 # some variables before 28 srcpath="Selection/Molecules/MoleculeByOrder" 29 srcfile=twowater.xyz 30 m4_include(CheckCommand.sh) 31 # the tests 32 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 -s water_id0.xyz" 33 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 -s water_id1.xyz" 34 mv water_id0.xyz water_id0_a.xyz 35 mv water_id1.xyz water_id1_a.xyz 36 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -2 --undo -s empty.xyz" 37 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -1 --undo -s empty.xyz" 38 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 --undo --redo -s water_id0.xyz" 39 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 --undo --redo -s water_id1.xyz" 40 mv water_id0.xyz water_id0_b.xyz 41 mv water_id1.xyz water_id1_b.xyz 42 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) 43 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) 44 AT_CLEANUP 72 73 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 74 srcfile=twowater.xyz 75 testfile=test.xyz 76 targetfile=water_id0.xyz 77 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 78 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -2 -s $targetfile], 0, [stdout], [stderr]) 79 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 80 81 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 82 srcfile=twowater.xyz 83 testfile=test.xyz 84 targetfile=water_id1.xyz 85 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 86 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -1 -s $targetfile], 0, [stdout], [stderr]) 87 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 88 89 AT_CLEANUP 90 91 92 AT_SETUP([Selection - Molecule by order, backward with Undo]) 93 AT_KEYWORDS([selection,molecule]) 94 95 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 96 srcfile=twowater.xyz 97 testfile=test.xyz 98 targetfile=empty.xyz 99 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 100 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -2 --undo -s $targetfile], 0, [stdout], [stderr]) 101 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 102 103 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 104 srcfile=twowater.xyz 105 testfile=test.xyz 106 targetfile=empty.xyz 107 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 108 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -1 --undo -s $targetfile], 0, [stdout], [stderr]) 109 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 110 111 AT_CLEANUP 112 113 114 AT_SETUP([Selection - Molecule by order, backward with Redo]) 115 AT_KEYWORDS([selection,molecule]) 116 117 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 118 srcfile=twowater.xyz 119 testfile=test.xyz 120 targetfile=water_id0.xyz 121 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 122 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -2 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 123 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 124 125 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 126 srcfile=twowater.xyz 127 testfile=test.xyz 128 targetfile=water_id1.xyz 129 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 130 AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-order -1 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 131 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 132 133 AT_CLEANUP 134 45 135 46 136 AT_SETUP([Unselection - Molecule by order, forward]) 47 137 AT_KEYWORDS([selection,molecule]) 48 # some variables before 49 srcpath="Selection/Molecules/MoleculeByOrder" 50 srcfile=twowater.xyz 51 m4_include(CheckCommand.sh) 52 # the tests 53 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 -s water_id1.xyz" 54 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 -s water_id0.xyz" 55 mv water_id1.xyz water_id1_a.xyz 56 mv water_id0.xyz water_id0_a.xyz 57 check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo -s twowater.xyz" 58 check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo -s twowater.xyz" 59 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo --redo -s water_id1.xyz" 60 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo --redo -s water_id0.xyz" 61 mv water_id0.xyz water_id0_b.xyz 62 mv water_id1.xyz water_id1_b.xyz 63 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) 64 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) 65 AT_CLEANUP 66 67 AT_SETUP([Unselection - Molecule by order, backward]) 68 AT_KEYWORDS([selection,molecule]) 69 # some variables before 70 srcpath="Selection/Molecules/MoleculeByOrder" 71 srcfile=twowater.xyz 72 m4_include(CheckCommand.sh) 73 # the tests 74 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 -s water_id1.xyz" 75 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 -s water_id0.xyz" 76 mv water_id1.xyz water_id1_a.xyz 77 mv water_id0.xyz water_id0_a.xyz 78 check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo -s twowater.xyz" 79 check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo -s twowater.xyz" 80 check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo --redo -s water_id1.xyz" 81 check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo --redo -s water_id0.xyz" 82 mv water_id0.xyz water_id0_b.xyz 83 mv water_id1.xyz water_id1_b.xyz 84 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) 85 AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) 86 AT_CLEANUP 138 139 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 140 srcfile=twowater.xyz 141 testfile=test.xyz 142 targetfile=water_id1.xyz 143 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 144 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 1 -s $targetfile], 0, [stdout], [stderr]) 145 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 146 147 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 148 srcfile=twowater.xyz 149 testfile=test.xyz 150 targetfile=water_id0.xyz 151 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 152 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 2 -s $targetfile], 0, [stdout], [stderr]) 153 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 154 155 AT_CLEANUP 156 157 158 AT_SETUP([Unselection - Molecule by order, forward with Undo]) 159 AT_KEYWORDS([selection,molecule]) 160 161 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 162 srcfile=twowater.xyz 163 testfile=test.xyz 164 targetfile=twowater.xyz 165 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 166 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 1 --undo -s $targetfile], 0, [stdout], [stderr]) 167 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 168 169 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 170 srcfile=twowater.xyz 171 testfile=test.xyz 172 targetfile=twowater.xyz 173 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 174 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 2 --undo -s $targetfile], 0, [stdout], [stderr]) 175 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 176 177 AT_CLEANUP 178 179 180 AT_SETUP([Unselection - Molecule by order, forward with Redo]) 181 AT_KEYWORDS([selection,molecule]) 182 183 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 184 srcfile=twowater.xyz 185 testfile=test.xyz 186 targetfile=water_id1.xyz 187 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 188 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 1 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 189 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 190 191 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 192 srcfile=twowater.xyz 193 testfile=test.xyz 194 targetfile=water_id0.xyz 195 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 196 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order 2 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 197 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 198 199 AT_CLEANUP 200 201 202 AT_SETUP([Selection - Molecule by order, backward]) 203 AT_KEYWORDS([selection,molecule]) 204 205 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 206 srcfile=twowater.xyz 207 testfile=test.xyz 208 targetfile=water_id1.xyz 209 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 210 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 -s $targetfile], 0, [stdout], [stderr]) 211 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 212 213 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 214 srcfile=twowater.xyz 215 testfile=test.xyz 216 targetfile=water_id0.xyz 217 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 218 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 -s $targetfile], 0, [stdout], [stderr]) 219 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 220 221 AT_CLEANUP 222 223 224 AT_SETUP([Selection - Molecule by order, backward with Undo]) 225 AT_KEYWORDS([selection,molecule]) 226 227 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 228 srcfile=twowater.xyz 229 testfile=test.xyz 230 targetfile=twowater.xyz 231 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 232 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 --undo -s $targetfile], 0, [stdout], [stderr]) 233 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 234 235 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 236 srcfile=twowater.xyz 237 testfile=test.xyz 238 targetfile=twowater.xyz 239 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 240 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 --undo -s $targetfile], 0, [stdout], [stderr]) 241 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 242 243 AT_CLEANUP 244 245 246 AT_SETUP([Selection - Molecule by order, backward with Redo]) 247 AT_KEYWORDS([selection,molecule]) 248 249 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 250 srcfile=twowater.xyz 251 testfile=test.xyz 252 targetfile=water_id1.xyz 253 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 254 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 255 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 256 257 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByOrder" 258 srcfile=twowater.xyz 259 testfile=test.xyz 260 targetfile=water_id0.xyz 261 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 262 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 263 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 264 265 AT_CLEANUP -
tests/regression/Selection/Molecules/MoleculeOfAtom/testsuite-selection-atoms-molecules.at
r93eb00 r7c958e 3 3 AT_SETUP([Selection - Molecules by atom selection]) 4 4 AT_KEYWORDS([selection,molecule]) 5 # some variables before 6 srcpath="Selection/Molecules/MoleculeOfAtom"5 6 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 7 7 srcfile=box.xyz 8 m4_include(CheckCommand.sh) 9 # the tests 10 check_command_output $srcpath $srcfile "water.xyz" "-I --select-atom-by-id 0 --select-atoms-molecules -s water.xyz" 11 mv water.xyz water_a.xyz 12 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-atom-by-id 0 --select-atoms-molecules --undo -s empty.xyz" 13 check_command_output $srcpath $srcfile "water.xyz" "-I --select-atom-by-id 0 --select-atoms-molecules --undo --redo -s water.xyz" 14 mv water.xyz water_b.xyz 15 AT_CHECK([diff -I '.*Created by molecuilder.*' water_a.xyz water_b.xyz], 0, [ignore], [ignore]) 8 testfile=test.xyz 9 targetfile=water.xyz 10 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 11 AT_CHECK([../../molecuilder -i $testfile -I --select-atom-by-id 0 --select-atoms-molecules -s $targetfile], 0, [stdout], [stderr]) 12 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 13 16 14 AT_CLEANUP 15 16 17 AT_SETUP([Selection - Molecules by atom selection with Undo]) 18 AT_KEYWORDS([selection,molecule]) 19 20 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 21 srcfile=box.xyz 22 testfile=test.xyz 23 targetfile=empty.xyz 24 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 25 AT_CHECK([../../molecuilder -i $testfile -I --select-atom-by-id 0 --select-atoms-molecules --undo -s $targetfile], 0, [stdout], [stderr]) 26 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 27 28 AT_CLEANUP 29 30 31 AT_SETUP([Selection - Molecules by atom selection with Redo]) 32 AT_KEYWORDS([selection,molecule]) 33 34 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 35 srcfile=box.xyz 36 testfile=test.xyz 37 targetfile=water.xyz 38 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 39 AT_CHECK([../../molecuilder -i $testfile -I --select-atom-by-id 0 --select-atoms-molecules --undo --redo -s $targetfile], 0, [stdout], [stderr]) 40 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 41 42 AT_CLEANUP 43 17 44 18 45 AT_SETUP([Unselection - Molecules by atom selection]) 19 46 AT_KEYWORDS([selection,molecule]) 20 # some variables before 21 srcpath="Selection/Molecules/MoleculeOfAtom"47 48 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 22 49 srcfile=box.xyz 23 m4_include(CheckCommand.sh) 24 # the tests 25 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules -s water_missing.xyz" 26 mv water_missing.xyz water_missing_a.xyz 27 check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules --undo -s box.xyz" 28 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules --undo --redo -s water_missing.xyz" 29 mv water_missing.xyz water_missing_b.xyz 30 AT_CHECK([diff -I '.*Created by molecuilder.*' water_missing_a.xyz water_missing_b.xyz], 0, [ignore], [ignore]) 50 testfile=test.xyz 51 targetfile=water_missing.xyz 52 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 53 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules -s $targetfile], 0, [stdout], [stderr]) 54 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 55 31 56 AT_CLEANUP 57 58 59 AT_SETUP([Unselection - Molecules by atom selection with Undo]) 60 AT_KEYWORDS([selection,molecule]) 61 62 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 63 srcfile=box.xyz 64 testfile=test.xyz 65 targetfile=box.xyz 66 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 67 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules --undo -s $targetfile], 0, [stdout], [stderr]) 68 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 69 70 AT_CLEANUP 71 72 73 AT_SETUP([Unselection - Molecules by atom selection with Redo]) 74 AT_KEYWORDS([selection,molecule]) 75 76 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeOfAtom" 77 srcfile=box.xyz 78 testfile=test.xyz 79 targetfile=water_missing.xyz 80 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 81 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --select-atom-by-id 0 --unselect-atoms-molecules --undo --redo -s $targetfile], 0, [stdout], [stderr]) 82 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 83 84 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.