[f2872a] | 1 | ### 6. (un)select atom by id
|
---|
| 2 |
|
---|
| 3 | AT_SETUP([Selection - atom with specific id])
|
---|
| 4 | AT_KEYWORDS([selection,id,atom])
|
---|
| 5 | # go through all possible ids (0-7) and removed
|
---|
| 6 | i=0
|
---|
| 7 | while test $i -lt 8; do
|
---|
| 8 | file=id${i}_missing.xyz
|
---|
| 9 | # normal
|
---|
| 10 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
| 11 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 12 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
| 13 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
| 14 | ((i+=1))
|
---|
| 15 | done
|
---|
| 16 | AT_CLEANUP
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | AT_SETUP([Selection - atom with specific id with Undo])
|
---|
| 20 | AT_KEYWORDS([selection,id,atom])
|
---|
| 21 | # go through all possible ids (0-7) and removed
|
---|
| 22 | i=0
|
---|
| 23 | while test $i -lt 8; do
|
---|
| 24 | file=id${i}_missing.xyz
|
---|
| 25 | # undo
|
---|
| 26 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
| 27 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 28 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
| 29 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/test-undo.xyz])
|
---|
| 30 | ((i+=1))
|
---|
| 31 | done
|
---|
| 32 | AT_CLEANUP
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | AT_SETUP([Selection - atom with specific id with Redo])
|
---|
| 36 | AT_KEYWORDS([selection,id,atom])
|
---|
| 37 | # go through all possible ids (0-7) and removed
|
---|
| 38 | i=0
|
---|
| 39 | while test $i -lt 8; do
|
---|
| 40 | file=id${i}_missing.xyz
|
---|
| 41 | # redo
|
---|
| 42 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
| 43 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 44 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
| 45 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
| 46 | ((i+=1))
|
---|
| 47 | done
|
---|
| 48 | AT_CLEANUP
|
---|