source: tests/GuiChecks/Selection/Atoms/AtomByOrder/testsuite-selection-unselect-atom-by-order.at

Candidate_v1.6.1
Last change on this file was dd6c07, checked in by Frederik Heber <heber@…>, 10 years ago

Added all new guichecks regression tests generated from createGuiChecks.sh script.

  • Property mode set to 100644
File size: 6.7 KB
Line 
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### 6. (un)select atom by order
19
20
21AT_SETUP([Unselection - atom with specific order])
22AT_KEYWORDS([unselection order atom unselect-atom-by-order])
23# go through all possible orders (0-7) and remove others
24i=1
25while test $i -le 8; do
26 let id=$i-1
27 file=order${id}_present.xyz
28 # normal
29 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
30 AT_CHECK([chmod u+w $file], 0)
31 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
32AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
33AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
34 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
35 ((i+=1))
36done
37# go reverse through all possible orders (0-7) and remove others
38i=1
39while test $i -le 8; do
40 let id=8-$i
41 file=order${id}_present.xyz
42 # normal
43 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
44 AT_CHECK([chmod u+w $file], 0)
45 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order -${i} -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
46AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
47AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
48 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
49 ((i+=1))
50done
51AT_CLEANUP
52
53
54AT_SETUP([Unselection - atom with specific order with Undo])
55AT_KEYWORDS([unselection order atom unselect-atom-by-order undo])
56# go through all possible orders (0-7) and remove others
57i=1
58while test $i -le 8; do
59 let id=$i-1
60 file=order${id}_present.xyz
61 # undo
62 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
63 AT_CHECK([chmod u+w $file], 0)
64 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} --undo -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
65AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
66AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
67 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/empty.xyz])
68 ((i+=1))
69done
70# go reverse through all possible orders (0-7) and remove others
71i=1
72while test $i -le 8; do
73 let id=8-$i
74 file=order${id}_present.xyz
75 # undo
76 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
77 AT_CHECK([chmod u+w $file], 0)
78 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order -${i} --undo -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
79AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
80AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
81 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/empty.xyz])
82 ((i+=1))
83done
84AT_CLEANUP
85
86
87AT_SETUP([Unselection - atom with specific order with Redo])
88AT_KEYWORDS([unselection order atom unselect-atom-by-order redo])
89# go through all possible orders (0-7) and remove others
90i=1
91while test $i -le 8; do
92 let id=$i-1
93 file=order${id}_present.xyz
94 # redo
95 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
96 AT_CHECK([chmod u+w $file], 0)
97 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} --undo --redo -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
98AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
99AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
100 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
101 ((i+=1))
102done
103# go reverse through all possible orders (0-7) and remove others
104i=1
105while test $i -le 8; do
106 let id=8-$i
107 file=order${id}_present.xyz
108 # redo
109 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
110 AT_CHECK([chmod u+w $file], 0)
111 AT_CHECK([../../molecuilder --dry-run -i $file -v 3 --select-all-atoms --unselect-atom-by-order -${i} --undo --redo -r --no-dry-run --store-session session-selection-unselect-atom-by-order.py --session-type python], 0[], [ignore], [ignore])
112AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-atom-by-order.py >session-selection-unselect-atom-by-order_new.py], 0, [ignore], [ignore])
113AT_CHECK([../../molecuilderguitest session-selection-unselect-atom-by-order_new.py], [], [ignore], [ignore])
114 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
115 ((i+=1))
116done
117AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.