From: Ondřej Surý Date: Mon, 30 Sep 2019 07:04:59 +0000 (+0200) Subject: Test of valid A-label in locale that cannot display it only with non-broken idn2 X-Git-Tag: v9.15.5~12^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c42e3583f932412346bb977645c401698f9c114b;p=thirdparty%2Fbind9.git Test of valid A-label in locale that cannot display it only with non-broken idn2 The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't fail when it should. This commit ensures that we don't run the system test for valid A-label in locale that cannot display with the buggy libidn2 as it would break the tests. --- diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh index 0d96c8bd7f2..fe8ae5551d4 100644 --- a/bin/tests/system/idna/tests.sh +++ b/bin/tests/system/idna/tests.sh @@ -254,12 +254,14 @@ idna_enabled_test() { # The "+[no]idnout" flag has no effect in these cases. text="Checking valid A-label in C locale" label="xn--nxasmq6b.com" - LC_ALL=C idna_test "$text" "" "$label" "$label." - LC_ALL=C idna_test "$text" "+noidnin +noidnout" "$label" "$label." - LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label." - LC_ALL=C idna_test "$text" "+idnin +noidnout" "$label" "$label." - LC_ALL=C idna_test "$text" "+idnin +idnout" "$label" "$label." - LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label." + if command -v idn2 >/dev/null && ! LC_ALL=C idn2 -d "$label" >/dev/null 2>/dev/null; then + LC_ALL=C idna_test "$text" "" "$label" "$label." + LC_ALL=C idna_test "$text" "+noidnin +noidnout" "$label" "$label." + LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label." + LC_ALL=C idna_test "$text" "+idnin +noidnout" "$label" "$label." + LC_ALL=C idna_test "$text" "+idnin +idnout" "$label" "$label." + LC_ALL=C idna_test "$text" "+noidnin +idnout" "$label" "$label." + fi