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

stable v1.7.0
Last change on this file was 780bfa, checked in by Frederik Heber <frederik.heber@…>, 3 months ago

FIX: FormatParserStorage did not add parser instance on SetOutput.

  • using the InputAction on an empty file would not write that file using the desired parser (judged from suffix) on exit because the respective was set as desired output but not instantiated (ParserPresent).
  • Property mode set to 100644
File size: 2.3 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 --set-undo-mark 1 --undo-till-mark], 0, [ignore], [ignore])
25
26# add an atom prior to undo-mark
27AT_CHECK([../../molecuilder -i test-simple-prior.conf --add-atom 1 --domain-position "5,5,5" --set-undo-mark 1 --undo-till-mark], 0, [stdout], [ignore])
28AT_CHECK([grep -q "^Ion_Type" test-simple-prior.conf], 0, [ignore], [ignore])
29
30# add an atom after to undo-mark
31AT_CHECK([../../molecuilder -i test-simple-after.conf --set-undo-mark 1 --add-atom 1 --domain-position "5,5,5" --undo-till-mark], 0, [stdout], [ignore])
32AT_CHECK([grep -q "^Ion_Type" test-simple-after.conf], 1, [ignore], [ignore])
33
34# add an atom and select after undo-mark: both undone
35AT_CHECK([../../molecuilder -i test-simple-two-undo.conf --set-undo-mark 1 --add-atom 1 --domain-position "5,5,5" --select-all-atoms --undo-till-mark], 0, [stdout], [ignore])
36AT_CHECK([grep -q "^Ion_Type" test-simple-two-undo.conf], 1, [ignore], [ignore])
37
38# input file with added atom: undo all (input has no undo)
39AT_CHECK([../../molecuilder --set-undo-mark 1 --input hydrogen.xyz --add-atom 1 --domain-position "5,5,5" --undo-till-mark --select-all-atoms], 0, [stdout], [ignore])
40AT_CHECK([grep "0 atoms selected" stdout], 0, [ignore], [ignore])
41
42# input file with added atom, then undo-mark: nothing undone
43AT_CHECK([../../molecuilder --input hydrogen.xyz --add-atom 1 --domain-position "5,5,5" --set-undo-mark 1 --undo-till-mark], 0, [stdout], [ignore])
44AT_CHECK([grep -q "H" hydrogen.xyz], 0, [ignore], [ignore])
45
46AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.