The attached patch should be close to the final one, hopefully. The tests are now executed in a UTF-8 and in a Latin-1 locale. I think they are fairly comprehensive as the flag interactions go. The tests do not actually test IDNA encoding and decoding in all its complexity, which is libidn2's domain and already covered by its tests. The tests in this patch only ensure that encoding and decoding is switch on and off as indicated by the flags. I added some negative testing, by faking an install libidn2.so.0 which is unusable. The other tests require a system libidn2 (which is already in the buildroot via dependencies on Fedora 28, and also available from EPEL). Testing uncovered some valgrind issues in libunistring (malloca from gnulib is broken), but considering how widely libidn2 is used already, this seems to affect non-UTF-8 locales only, I do not consider it a blocker. Thanks, Florian