7 print "not " unless uri_escape("|abcå") eq "%7Cabc%E5";
10 print "not " unless uri_escape("abc", "b-d") eq "a%62%63";
13 print "not " if defined(uri_escape(undef));
16 print "not " unless uri_unescape("%7Cabc%e5") eq "|abcå";
19 print "not " unless join(":", uri_unescape("%40A%42", "CDE", "F%47H")) eq
24 use URI::Escape qw(%escapes);
26 print "not" unless $escapes{"%"} eq "%25";
30 use URI::Escape qw(uri_escape_utf8);
32 print "not " unless uri_escape_utf8("|abcå") eq "%7Cabc%C3%A5";
36 print "ok 8 # skip perl-5.8 required\n";
37 print "ok 9 # skip perl-5.8 required\n";
40 eval { print uri_escape("abc" . chr(300)) };
41 print "not " unless $@ && $@ =~ /^Can\'t escape \\x{012C}, try uri_escape_utf8\(\) instead/;
44 print "not " unless uri_escape_utf8(chr(0xFFF)) eq "%E0%BF%BF";