simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Apr 4 23:05:59 BST 2025
TL;DR:
6332497a test_unicode_norm: fix display of failing tests.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2025-04-04 23:05:59
commit 6332497afb798448a5cd744aa7026822823f201b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6332497afb798448a5cd744aa7026822823f201b;hp=7a100534d3dbfd4ce06245fee0dcec04cd724a72
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Apr 4 23:00:35 2025 +0100
test_unicode_norm: fix display of failing tests.
There was a bytes / array elements confusion in the code that prints
out the input and output Unicode strings when a test fails. It was
using a loop with index variable 'pos', which was used as an array
index, but incremented by sizeof(a character) each time, leading to
only every fourth character actually being printed.
I assume this is leftover confusion from when I hadn't quite decided
whether to abuse the char-based strbuf for these Unicode character
buffers, or make a specialist type.
Discovered when I reached for this test program just now in order to
manually decompose a Unicode string. It doesn't have a convenient CLI
for that, but it was a thing I already knew where to find!
utils/unicode-norm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
More information about the tartarus-commits
mailing list