|
BEGIN { binmode STDOUT, ':utf8' ; binmode STDERR, ':utf8' ; }
BEGIN { $Net::IDN::Punycode::_NO_XS = 1; }
no warnings 'utf8' ;
my %p = ( "TransitionalProcessing" => "0" );
is( eval {uts46_to_ascii( "xn--0.pt" , %p )}, undef , "to_ascii\(\'xn\-\-0\.pt\'\)\ throws\ error\ A3\ \[data\/IdnaTest\.txt\:256\]" ) or ($@ and diag($@));
is( eval {uts46_to_unicode( "xn--0.pt" , %p )}, undef , "to_unicode\(\'xn\-\-0\.pt\'\)\ throws\ error\ A3\ \[data\/IdnaTest\.txt\:256\]" ) or ($@ and diag($@));
is( eval {Net::IDN::Punycode::decode_punycode(0)}, undef , "decode_punycode(0) throws error" ) or ($@ and diag($@));
is( eval {uts46_to_unicode( "xn--u19a" )}, 'ꯀ' , "to_unicode\(\'xn\-\-u19a\'\)" );
exit (0);
|