tinymux/tests/nls
Stephen Dennis 8472394235 fix(test): test-nls-plural no longer links, breaking make test (#1653, #1702)
The #1653 snprintf ban converted mux_nls.cpp's path build to mux_sprintf --
correct in itself -- and test_plural.cpp compiles that file standalone to
reach the anonymous-namespace plural_eval(), linking nothing.  Undefined
reference; `make test` red at test-nls-plural on master for everyone.

Supply the symbol in the test, vsnprintf-backed, with the honesty note in
place: the only caller is mux_nls_init()'s catalogue-path build, which no
plural test exercises -- the linker merely needs the definition.  If a
tested path ever formats through the stub, the note says to stop stubbing
and link the real one, because mux_sprintf differs from vsnprintf at UTF-8
truncation boundaries.

Same shape as the established recipe for unit-testing library TUs with a
handful of stubs (tests/dbt, netaddr).

Verified: make test-nls-plural 43 passed, 0 failed.

Found while validating #1745 on this box -- its TESTEXIT=2 here was this
master breakage, not the lua_jit flip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 21:22:29 -06:00
..
check_nls.py fix(nls): an unrecognised catalogue policy silently took the lenient path (#1419) 2026-07-28 20:09:42 +00:00
run.sh feat(nls): language in netmux.conf, and one catalogue reader everywhere (#1702) 2026-07-28 19:29:13 +00:00
run_ko.sh nls: implement %N$ positional args in mux_vsnprintf (#1623) 2026-07-27 23:26:05 -06:00
test_plural.cpp fix(test): test-nls-plural no longer links, breaking make test (#1653, #1702) 2026-07-28 21:22:29 -06:00