From: Ondřej Surý Date: Wed, 1 Dec 2021 09:20:31 +0000 (+0100) Subject: Add an idna test that _ and * characters are preserved X-Git-Tag: v9.17.21~8^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce1256c0665dcbec31b92fa86d773a55f51d661c;p=thirdparty%2Fbind9.git Add an idna test that _ and * characters are preserved Add a idna that checks whether non-character letters like _ and * are preserved when IDN is enabled. This wasn't the case when UseSTD3ASCIIRules were enabled, f.e. _ from _tcp would get mangled to tcp. --- diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh index d7da8e3427a..f45930d44d8 100644 --- a/bin/tests/system/idna/tests.sh +++ b/bin/tests/system/idna/tests.sh @@ -347,6 +347,24 @@ idna_enabled_test() { idna_test "$text" "+noidnin +noidnout" "xn--19g" "xn--19g." idna_fail "$text" "+noidnin +idnout" "xn--19g" idna_fail "$text" "+idnin +idnout" "xn--19g" + + + # Test that non-letter characters are preserved in the output. When + # UseSTD3ASCIIRules are enabled, it would mangle non-letter characters like + # `_` (underscore) and `*` (wildcard. + + test="Checking valid non-letter characters" + idna_test "$text" "" "*.xn--nxasmq6b.com" "*.xn--nxasmq6b.com." + idna_test "$text" "+noidnin +noidnout" "*.xn--nxasmq6b.com" "*.xn--nxasmq6b.com." + idna_test "$text" "+noidnin +idnout" "*.xn--nxasmq6b.com" "*.βόλοσ.com." + idna_test "$text" "+idnin +noidnout" "*.xn--nxasmq6b.com" "*.xn--nxasmq6b.com." + idna_test "$text" "+idnin +idnout" "*.xn--nxasmq6b.com" "*.βόλοσ.com." + + idna_test "$text" "" "_tcp.xn--nxasmq6b.com" "_tcp.xn--nxasmq6b.com." + idna_test "$text" "+noidnin +noidnout" "_tcp.xn--nxasmq6b.com" "_tcp.xn--nxasmq6b.com." + idna_test "$text" "+noidnin +idnout" "_tcp.xn--nxasmq6b.com" "_tcp.βόλοσ.com." + idna_test "$text" "+idnin +noidnout" "_tcp.xn--nxasmq6b.com" "_tcp.xn--nxasmq6b.com." + idna_test "$text" "+idnin +idnout" "_tcp.xn--nxasmq6b.com" "_tcp.βόλοσ.com." }