]> git.ipfire.org Git - thirdparty/gettext.git/commit
tests: Add option --thread to tstgettext, tstngettext.
authorBruno Haible <bruno@clisp.org>
Sun, 1 Oct 2023 18:18:02 +0000 (20:18 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 6 Oct 2023 14:25:03 +0000 (16:25 +0200)
commit9d9bab873bbc1f2a1ac4ae509cfb38537daeb787
treeb3c06172ff892edc6a41e792cbd83e0234f7d24c
parent0608425df6301b80949e889d17a9f693b9982ce0
tests: Add option --thread to tstgettext, tstngettext.

* gettext-tools/tests/tstgettext.c: Include glthread/thread.h.
(inhibit_added_newline, do_expand): Remove variables.
(long_options): Add --thread option.
(struct worker_context): New type.
(main): Move some local variables into a context. Recognize option --thread.
At the end, invoke worker_thread.
(worker_thread): New function, extracted from main.
* gettext-tools/tests/tstngettext.c: Include glthread/thread.h.
(long_options): Add --thread option.
(struct worker_context): New type.
(main): Move some local variables into a context. Recognize option --thread.
At the end, invoke worker_thread.
(worker_thread): New function, extracted from main.
* gettext-tools/tests/Makefile.am (tstgettext_LDADD, tstngettext_LDADD): Add
gnulib-lib/libtestsgnu.a and $(LIBMULTITHREAD).
gettext-tools/tests/Makefile.am
gettext-tools/tests/tstgettext.c
gettext-tools/tests/tstngettext.c