source: tests/GuiChecks/Options/UndoMark/testsuite-options-undo-mark.at

Candidate_v1.7.1 stable v1.7.1
Last change on this file was 4538c0, checked in by Frederik Heber <frederik.heber@…>, 5 days ago

Recreated guicheck from regression tests.

  • Property mode set to 100644
File size: 4.1 KB
Line 
1#
2# MoleCuilder - creates and alters molecular systems
3# Copyright (C) 2021 Frederik Heber
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### undo mark
19
20AT_SETUP([Standard Options - undo mark])
21AT_KEYWORDS([options undo-mark])
22
23# simple call
24AT_CHECK([../../molecuilder --dry-run --set-undo-mark 1 --undo-till-mark --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [ignore], [ignore])
25AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
26AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [ignore], [ignore])
27
28# add an atom prior to undo-mark
29AT_CHECK([../../molecuilder --dry-run -i test-simple-prior.conf --add-atom 1 --domain-position "5,5,5" --set-undo-mark 1 --undo-till-mark --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [stdout], [ignore])
30AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
31AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [stdout], [ignore])
32AT_CHECK([grep -q "^Ion_Type" test-simple-prior.conf], 0, [ignore], [ignore])
33
34# add an atom after to undo-mark
35AT_CHECK([../../molecuilder --dry-run -i test-simple-after.conf --set-undo-mark 1 --add-atom 1 --domain-position "5,5,5" --undo-till-mark --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [stdout], [ignore])
36AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
37AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [stdout], [ignore])
38AT_CHECK([grep -q "^Ion_Type" test-simple-after.conf], 1, [ignore], [ignore])
39
40# add an atom and select after undo-mark: both undone
41AT_CHECK([../../molecuilder --dry-run -i test-simple-two-undo.conf --set-undo-mark 1 --add-atom 1 --domain-position "5,5,5" --select-all-atoms --undo-till-mark --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [stdout], [ignore])
42AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
43AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [stdout], [ignore])
44AT_CHECK([grep -q "^Ion_Type" test-simple-two-undo.conf], 1, [ignore], [ignore])
45
46# input file with added atom: undo all (input has no undo)
47AT_CHECK([../../molecuilder --dry-run --set-undo-mark 1 --input hydrogen.xyz --add-atom 1 --domain-position "5,5,5" --undo-till-mark --select-all-atoms --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [stdout], [ignore])
48AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
49AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [stdout], [ignore])
50
51# input file with added atom, then undo-mark: nothing undone
52AT_CHECK([../../molecuilder --dry-run --input hydrogen.xyz --add-atom 1 --domain-position "5,5,5" --set-undo-mark 1 --undo-till-mark --no-dry-run --store-session session-options-undo-mark.py --session-type python], 0, [stdout], [ignore])
53AT_CHECK([grep -v "Command.*DryRun" session-options-undo-mark.py >session-options-undo-mark_new.py], 0, [ignore], [ignore])
54AT_CHECK([../../molecuilderguitest session-options-undo-mark_new.py], 0, [stdout], [ignore])
55AT_CHECK([grep -q "H" hydrogen.xyz], 0, [ignore], [ignore])
56
57AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.