lib: split bytes tests into equal/index/contains/tokenize/trim per ref/hare/bytes

Pure move: bytes_test.ww dissolves along its banner seams into sibling
equal_test.ww, index_test.ww (u8 + []u8 arms of index/rindex),
contains_test.ww (contains/hasprefix/hassuffix), tokenize_test.ww
(tokenize/rtokenize/peektoken/remainingtokens + splitn/rsplitn/split +
cut/rcut), and trim_test.ww, mirroring ref/hare/bytes/{equal,index,
contains,tokenize,trim}.ha ownership (Hare keeps splitn and cut in
tokenize.ha; contains.ha owns hasprefix/hassuffix). Blocks are
byte-identical; only the banner lines are deleted. Helpers stay with
their sole consumers: expect_token/expect_done/expect_tok in
tokenize_test.ww, beq in trim_test.ww.

Consumers: Makefile LIBRARY_TESTS replaces the bytes_test.ww entry
with the five new entries at the same position; the
test/byteid/libbyteid_test.ww roster row becomes five fx rows,
NENTEXPECT 48->52 (+4).
This commit is contained in:
2026-08-08 16:40:32 +09:00
parent 8a1dc641e3
commit 4f37a8b425
7 changed files with 347 additions and 329 deletions

View File

@@ -488,7 +488,9 @@ LIBRARY_TESTS = lib/errors/errno_test.ww lib/ascii/ascii_test.ww \
lib/strconv/test/int_test.ww lib/strings/strings_test.ww \
lib/strings/suffix_test.ww lib/strings/contains_test.ww \
lib/strings/index_test.ww lib/strings/compare_test.ww \
lib/bytes/bytes_test.ww lib/encoding/utf8/utf8_test.ww \
lib/bytes/equal_test.ww lib/bytes/index_test.ww \
lib/bytes/contains_test.ww lib/bytes/tokenize_test.ww \
lib/bytes/trim_test.ww lib/encoding/utf8/utf8_test.ww \
lib/bufio/bufio_test.ww lib/math/random/random_test.ww \
lib/math/checked/checked_test.ww lib/fmt/fmt_test.ww \
lib/log/log_test.ww lib/log/silent_test.ww lib/fnmatch/fnmatch_test.ww \