Files
lotherk 4fead8a3dc libDtChat tests: no /tmp/opencode, and test_i18n finds its catalogs
Two defects in the test suite, both of the kind that fails on another
machine but not on the one it was written on.

1. Seven tests put their scratch directories below /tmp/opencode --
   a directory of the environment they were written in, not of the
   system.  mkdtemp() returns NULL when the parent is missing, so on a
   machine without /tmp/opencode every one of them failed with a "NULL"
   check or perror("mkdtemp"), and nothing was wrong with the code under
   test.  dc_test_tmpdir() (dc_internal.h, instance.c) now uses $TMPDIR,
   or /tmp when it is unset or not absolute.

   Measured: after renaming /tmp/opencode away (sudo mv), make check in
   lib/libDtChat is 24/24; before the change the same run failed on
   test_identity, test_pair, test_store, test_instance, test_filexfer,
   test_local and test_i18n.

2. test_i18n takes <de.msg> <en.msg> but TESTS runs it without arguments
   (f46a914c added it to TESTS without a runner), so `make check' always
   reported "FAIL: test_i18n" with the usage line -- measured 2026-11-22
   on the merge build, and identically on build/mcde-host, so not a
   regression of that merge.  tools/mcde-tests.sh names the files and
   passes; the test now falls back to $srcdir (which automake's test
   driver exports) and finds them itself, the arguments still winning.

Test: make check in lib/libDtChat -> 24/24 PASS (was 23/24).  Both call
forms of test_i18n give "test_i18n: all ok": with the two arguments and
without them.  With /tmp/opencode renamed away the full check is green as
well, and the seven scratch directories appear under $TMPDIR when set.
2026-11-22 16:11:16 +00:00
..
2026-11-22 13:51:31 +01:00