4496. [func] dig: add +idnout to control whether labels are

display in punycode or not.  Requires idn support
                        to be enabled at compile time. [RT #43398]
This commit is contained in:
Mark Andrews
2016-10-28 12:05:19 +11:00
parent 49e94dc8d4
commit 42470b0b87
11 changed files with 275 additions and 13 deletions

View File

@@ -384,6 +384,23 @@ if [ -x ${DIG} ] ; then
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
if $FEATURETEST --with-idn
then
echo "I:checking dig +idnout ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.3 +noidnout xn--caf-dma.example. > dig.out.1.test$n 2>&1 || ret=1
$DIG $DIGOPTS @10.53.0.3 +idnout xn--caf-dma.example. > dig.out.2.test$n 2>&1 || ret=1
grep "^xn--caf-dma.example" dig.out.1.test$n > /dev/null || ret=1
grep "^xn--caf-dma.example" dig.out.2.test$n > /dev/null && ret=1
grep 10.1.2.3 dig.out.1.test$n > /dev/null || ret=1
grep 10.1.2.3 dig.out.2.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
else
echo "I:skipping 'dig +idnout' as IDN support is not enabled ($n)"
fi
else
echo "$DIG is needed, so skipping these dig tests"
fi