| 1 | # | 
|---|
| 2 | #    MoleCuilder - creates and alters molecular systems | 
|---|
| 3 | #    Copyright (C) 2008-2012 University of Bonn | 
|---|
| 4 | # | 
|---|
| 5 | #    This program is free software: you can redistribute it and/or modify | 
|---|
| 6 | #    it under the terms of the GNU General Public License as published by | 
|---|
| 7 | #    the Free Software Foundation, either version 3 of the License, or | 
|---|
| 8 | #    (at your option) any later version. | 
|---|
| 9 | # | 
|---|
| 10 | #    This program is distributed in the hope that it will be useful, | 
|---|
| 11 | #    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 12 | #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 13 | #    GNU General Public License for more details. | 
|---|
| 14 | # | 
|---|
| 15 | #    You should have received a copy of the GNU General Public License | 
|---|
| 16 | #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
|---|
| 17 | # | 
|---|
| 18 | ### 1. (un)select all molecules | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | AT_SETUP([Selection - All Molecules]) | 
|---|
| 22 | AT_KEYWORDS([selection molecule select-all-molecules]) | 
|---|
| 23 |  | 
|---|
| 24 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/AllMolecules" | 
|---|
| 25 | srcfile=box.xyz | 
|---|
| 26 | testfile=test.xyz | 
|---|
| 27 | targetfile=box.xyz | 
|---|
| 28 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) | 
|---|
| 29 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules -s $targetfile], 0, [stdout], [stderr]) | 
|---|
| 30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) | 
|---|
| 31 |  | 
|---|
| 32 | AT_CLEANUP | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 | AT_SETUP([Selection - All Molecules with Undo]) | 
|---|
| 36 | AT_KEYWORDS([selection molecule select-all-molecules undo]) | 
|---|
| 37 |  | 
|---|
| 38 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/AllMolecules" | 
|---|
| 39 | srcfile=box.xyz | 
|---|
| 40 | testfile=test.xyz | 
|---|
| 41 | targetfile=empty.xyz | 
|---|
| 42 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) | 
|---|
| 43 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --undo -s $targetfile], 0, [stdout], [stderr]) | 
|---|
| 44 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) | 
|---|
| 45 |  | 
|---|
| 46 | AT_CLEANUP | 
|---|
| 47 |  | 
|---|
| 48 |  | 
|---|
| 49 | AT_SETUP([Selection - All Molecules with Redo]) | 
|---|
| 50 | AT_KEYWORDS([selection molecule select-all-molecules redo]) | 
|---|
| 51 |  | 
|---|
| 52 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/AllMolecules" | 
|---|
| 53 | srcfile=box.xyz | 
|---|
| 54 | testfile=test.xyz | 
|---|
| 55 | targetfile=box.xyz | 
|---|
| 56 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) | 
|---|
| 57 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --undo --redo -s $targetfile], 0, [stdout], [stderr]) | 
|---|
| 58 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) | 
|---|
| 59 |  | 
|---|
| 60 | AT_CLEANUP | 
|---|