]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Modify idna test to fallback to ACE
authorPetr Menšík <pemensik@redhat.com>
Tue, 29 Jan 2019 18:11:19 +0000 (19:11 +0100)
committerOndřej Surý <ondrej@sury.org>
Mon, 30 Sep 2019 06:52:13 +0000 (08:52 +0200)
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.

bin/tests/system/idna/tests.sh

index bb2514293d1029192e9378c70e1cc86807456e6d..0d96c8bd7f291e3ffdac182761d14c8cfe2f0f98 100644 (file)
@@ -244,6 +244,23 @@ idna_enabled_test() {
     idna_test "$text" "+idnin +noidnout"   "xn--nxasmq6b.com" "xn--nxasmq6b.com."
     idna_test "$text" "+idnin +idnout"     "xn--nxasmq6b.com" "βόλοσ.com."
 
+    # Test of valid A-label in locale that cannot display it
+    #
+    # +noidnout: The string is sent as-is to the server and the returned qname
+    #            is displayed in the same form.
+    # +idnout:   The string is sent as-is to the server and the returned qname
+    #            is displayed as the corresponding A-label.
+    #
+    # 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."
+
 
 
     # Tests of invalid A-labels