1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/test
Simon Tatham 3c3c179237 Don't set term->wrapnext when not in auto-wrapping mode.
A user sent a transcript from a curses-based tool 'ncmpc', which
carefully disables terminal autowrap when printing a character in the
bottom right corner of the display, and then turns it back on again.
After that, it expects that sending the backspace character really
moves the cursor back a space, instead of clearing the wrapnext flag.

But in PuTTY, we set the wrapnext flag even if we're not in wrapping
mode - it just doesn't _do_ anything when the next character is sent.
But it remains set, and still affects backspace. So the display is
corrupted by this change of expectation.

(Specifically, ncmpc is printing a time display [m:ss] in the very
bottom right, so it disables wrap in order to print the final ']'.
Then the next thing it needs to do is to update the low-order digit of
the seconds field, so it sends \b as the simplest way to get to that
character. The effect on the display is that the updated seconds digit
appears where the ] was, instead of overwriting the old seconds digit.)

This is a tradeoff in desirable behaviours. The point of having a
backspace operation cancel the wrapnext flag and not actually move the
cursor is to preserve the invariant that sending 'x', backspace, 'y'
causes the y to overprint the x, even if that happens near the end of
the terminal's line length. In non-wrapping mode that invariant was
bound to break _eventually_, but with this change, it breaks one
character earlier than before. However, I think that's less bad than
breaking the expectations of curses-based full-screen applications,
especially since the _main_ need for that invariant arises from naïve
applications that don't want to have to think about the terminal width
at all - and those applications generally run in _wrapping_ mode,
where it's possible to continue the invariant across multiple lines in
any case.
2024-08-10 11:45:53 +01:00
..
sclog Side-channel tester: align memory allocations. 2024-04-01 13:10:49 +01:00
agentmulti.py Add test script for simultaneous agent connections. 2021-05-24 15:27:38 +01:00
agenttest.py Migrate all Python scripts to Python 3. 2020-03-04 21:23:49 +00:00
agenttestdata.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
agenttestgen.py RSA generation: option to generate strong primes. 2020-03-07 11:37:31 +00:00
ca.py test/ca.py: fix handling of RFC4716 public key files. 2022-07-30 15:01:09 +01:00
colours.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
cryptsuite.py Pad RSA signature blobs if they're made with SHA-2. 2024-07-08 21:49:39 +01:00
desref.py Migrate all Python scripts to Python 3. 2020-03-04 21:23:49 +00:00
display.txt Add SGR 9 strikethrough to test file. 2020-08-13 23:54:58 +01:00
dsa_nonce_recover.py dsa_nonce_recover.py: feature to talk to an agent. 2024-04-07 13:23:37 +01:00
eccref.py Migrate all Python scripts to Python 3. 2020-03-04 21:23:49 +00:00
fuzzterm.c New centralised version of local line editing. 2023-03-04 13:55:50 +00:00
lattrs.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
list-accel.py Implement AES-GCM using the @openssh.com protocol IDs. 2022-08-16 20:33:58 +01:00
mpu-check.pl Generate MPU certificates for proven primes. 2020-03-07 11:24:12 +00:00
numbertheory.py test/numbertheory.py: fix comment wording. 2020-05-03 11:18:50 +01:00
primegen.py primegen.py: add a --probabilistic option. 2021-08-28 10:17:16 +01:00
scocols.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
ssh.py Test implementation of a CA in Python. 2022-04-25 15:09:31 +01:00
test_conf.c Centralise defaults for non-saved options. 2023-09-22 16:42:47 +01:00
test_lineedit.c Run test_lineedit and test_terminal in the main build. 2023-03-05 10:26:45 +00:00
test_terminal.c Don't set term->wrapnext when not in auto-wrapping mode. 2024-08-10 11:45:53 +01:00
testcrypt-enum.h Add support for HMAC-SHA512. 2023-04-23 13:24:19 +01:00
testcrypt-func.h Merge 0.81 branch. 2024-04-15 19:42:50 +01:00
testcrypt.c testcrypt: allow null return from ssh2_mac_new. 2023-08-22 19:36:05 +01:00
testcrypt.py Suppress syntax warnings on Python 3.12. 2024-08-01 21:38:07 +01:00
testsc.c testsc: fix disorganised alloc/free in test_hash(). 2024-04-06 09:31:12 +01:00
testzlib.c Move some tests into the test subdirectory. 2021-11-22 19:11:53 +00:00
utf8.txt Stop ignoring the Unicode tag character range. 2024-05-24 22:25:56 +01:00
vt100.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
windowchange.py Test program for ancillary window updates. 2021-02-07 19:59:21 +00:00