lib: split utf8 tests into rune/encode/decode/types per ref/hare/encoding/utf8

Pure move: utf8_test.ww dissolves along its banner seams into sibling
rune_test.ww (runesz/utf8sz), encode_test.ww (encoderune),
decode_test.ww (decoder next/prev/validate/remaining/slice/position
plus the encode->decode round-trip), and types_test.ww (strerror),
mirroring ref/hare/encoding/utf8/{rune,encode,decode,types}.ha
ownership (types.ha:12 owns strerror). Blocks are byte-identical;
only the banner lines are deleted. The streq helper moves with its
sole consumer, strerror_cases, into types_test.ww. The impl utf8.ww
is untouched (no banners).

Consumers: Makefile LIBRARY_TESTS replaces the utf8_test.ww entry
with the four new entries at the same position; the
test/byteid/libbyteid_test.ww roster row becomes four fx rows,
NENTEXPECT 52->55 (+3).
This commit is contained in:
2026-08-08 16:41:48 +09:00
parent 4f37a8b425
commit cf90c50c38
6 changed files with 145 additions and 137 deletions

View File

@@ -43,7 +43,7 @@ import time;
def MID: i32 = 0;
def MDIVERGE: i32 = 1;
def MWWREJECT: i32 = 2;
def NENTEXPECT: i32 = 55;
def NENTEXPECT: i32 = 58;
type ent = struct {
fixture: str, // repo-relative .ww; "" -> probe entry
@@ -83,7 +83,7 @@ fn pri(p: str, inc: str, sentinel: str, moddir: str) ent = {
return e;
};
// The 55-unit roster. Graduation history lives in git (the retired C
// The 58-unit roster. Graduation history lives in git (the retired C
// carrier's table comments); cites are kept only where a non-ID pin
// would need them.
fn corpus() []ent = {
@@ -96,7 +96,10 @@ fn corpus() []ent = {
append(es, fx("lib/dirs/dirs_test.ww"));
append(es, fx("lib/encoding/base32/base32_test.ww"));
append(es, fx("lib/encoding/hex/hex_test.ww"));
append(es, fx("lib/encoding/utf8/utf8_test.ww"));
append(es, fx("lib/encoding/utf8/rune_test.ww"));
append(es, fx("lib/encoding/utf8/encode_test.ww"));
append(es, fx("lib/encoding/utf8/decode_test.ww"));
append(es, fx("lib/encoding/utf8/types_test.ww"));
append(es, fx("lib/getopt/getopt_test.ww"));
append(es, fx("lib/hash/adler32/adler32_test.ww"));
append(es, fx("lib/hash/crc16/crc16_test.ww"));