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 640c7028f8 More Unicode samples for utf8.txt, most of which fail.
These samples all come from the 'emoji' parts of Unicode, although I
use the word a bit loosely because I'm not sure that flags count (they
have their own special system). But they're all things that ought to
display via a separate font, likely in colour.

The second line of this extra test already looks correct in PuTTY:
three code points each representing an emoji, for which wcwidth()
correctly reports that they occupy 2 cells each. On GTK, the emoji
even appear in colour; on Windows they come out in black and
white. (And I don't know what I can do to fix that; the problem is not
that I don't have any emoji font installed. I do.)

The first line consists of 'simpler' emoji in the sense of being more
common, but technically more complicated, because they're ordinary
Unicode characters such as U+2764 HEAVY BLACK HEART, modified into
emoji by U+FE0F VARIATION SELECTOR-16. This goes badly because
wcwidth() measures the primary character as having width 1 (which it
would do, by itself), and the variation selector as width 0 (also not
unreasonable), but the total is 1, where you'd like it to be 2. This
is also difficult to fix, because if we unilaterally changed it then
every curses-type library would mispredict the cursor position and
produce display corruption during partial screen redraws!

The third line uses a mechanism I've only found out about recently:
U+200D ZERO WIDTH JOINER glues together two code points that would
each be a valid emoji on its own, to make a single combined one. In
this case, WOMAN + PERSONAL COMPUTER ought to combine into a woman
using a computer. Again this doesn't work in PuTTY, which knows
nothing about ZWJ. But it comes out as expected in other tools viewing
this file, such as 'gedit', or Firefox.

The fourth line shows another complex emoji case: the WOMAN code point
is followed by U+1F3FB EMOJI MODIFIER FITZPATRICK TYPE-1-2, and
another one is followed by U+1F3FF EMOJI MODIFIER FITZPATRICK TYPE-6,
in each case selecting the woman's skin tone. PuTTY mishandles that
too, because it doesn't know that those should act as modifiers (again
because wcwidth gives them width 2 rather than 0), and so each one
occupies an extra two character cells.

And the last line contains some sample flags, each of which is
obtained by writing a 2-letter code for a country or region (here GB,
UA, EU) with each Latin letter replaced by the appropriate 'regional
indicator symbol letter' from the 26-code-point range U+1F1E6 to
U+1F1FF inclusive. PuTTY doesn't know anything about those either, but
they at least occupy the right number of cells if handled naïvely, so
_that_ one might be possible to fix!
2024-05-06 13:35:14 +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 Merge 0.81 branch. 2024-04-15 19:42:50 +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 Run test_lineedit and test_terminal in the main build. 2023-03-05 10:26:45 +00: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 Implement OpenSSH 9.x's NTRU Prime / Curve25519 kex. 2022-04-15 17:46:06 +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 More Unicode samples for utf8.txt, most of which fail. 2024-05-06 13:35:14 +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