1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 02:27:32 -05:00

Test rig for the new bidi algorithm.

This standalone CLI program runs the UCD bidi tests in the form
provided in Unicode 14.0.0. You can run it by just saying

  bidi_test --class BidiTest.txt --char BidiCharacterTest.txt

assuming those two UCD files are in the current directory.
This commit is contained in:
Simon Tatham
2021-10-10 14:52:17 +01:00
parent b8be01adca
commit 93ba74579a
4 changed files with 390 additions and 0 deletions

View File

@ -3589,6 +3589,14 @@ void do_bidi_new(BidiContext *ctx, bidi_char *text, size_t textlen)
reverse_sequences(ctx);
}
size_t do_bidi_test(BidiContext *ctx, bidi_char *text, size_t textlen,
int override)
{
ctx->paragraphOverride = (override > 0 ? L : override < 0 ? R : ON);
do_bidi_new(ctx, text, textlen);
return ctx->textlen;
}
void do_bidi(BidiContext *ctx, bidi_char *text, size_t textlen)
{
#ifdef REMOVE_FORMATTING_CHARACTERS