diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 12:24:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 21d2240b9b86ae5ba0036988b0ed84fbcf18d3af (patch) | |
| tree | d155d9c7e8f6eb51734cb3dc6544fbf6ceb2e1c5 /test/fs.py | |
| parent | cfcff94ab2b1ff5a0fb61dead60ead09bf892d30 (diff) | |
| download | pardes-21d2240b9b86ae5ba0036988b0ed84fbcf18d3af.tar.gz pardes-21d2240b9b86ae5ba0036988b0ed84fbcf18d3af.zip | |
Restore asks about unsaved text first, as Exit does
Restore replaces every pane with a dump's, so a pane edited since its last save
lost that text without a word, where Exit asks. acme's Load only adds a dump's
windows and so never asks; Restore now asks what Exit asks (acme's rowclean and
winclean, wind.c:511-529): each modified pane says so once, and Restore again
with nothing edited since goes ahead. Exit and Restore share the check and its
warned-at revision, as acme's winclean clears one dirty flag for any asker.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
| -rw-r--r-- | test/fs.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -601,6 +601,13 @@ def test(binary, quic=False): assert old.read_fid(held_body) == b'dumped state\n' assert old.read_fid(held_screen, count=1) == b'{' old.write('/pane/1/body', b'changed after dump\n', truncate=True) + # Unsaved text is asked about once, as Exit asks; the second + # Restore goes ahead. + try: + execute(old, control, 'Restore ' + str(saved)) + except OSError as refused: + assert 'Modified' in str(refused), refused + assert old.read('/pane/1/body') == b'changed after dump\n' try: execute(old, control, 'Restore ' + str(saved)) except (EOFError, ConnectionResetError, BrokenPipeError): |
