summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2000-08-16 18:52:23 +0000
committerGisle Aas <gisle@aas.no>2000-08-16 18:52:23 +0000
commitc265a8c4bbfbc5cb05790472321a1247745daf90 (patch)
treea56861685bc58f938a45b7c40c43f158b41ad0b9
parent9a32c3dd287879224bad613e3fc3c9bb83cd9d99 (diff)
downloaduri-c265a8c4bbfbc5cb05790472321a1247745daf90.tar.gz
First revision.R1.09
-rw-r--r--t/escape.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/escape.t b/t/escape.t
new file mode 100644
index 0000000..e8c3e65
--- /dev/null
+++ b/t/escape.t
@@ -0,0 +1,26 @@
+print "1..6\n";
+
+use URI::Escape;
+
+print "not " unless uri_escape("|abcå") eq "%7Cabc%E5";
+print "ok 1\n";
+
+print "not " unless uri_escape("abc", "b-d") eq "a%62%63";
+print "ok 2\n";
+
+print "not " if defined(uri_escape(undef));
+print "ok 3\n";
+
+print "not " unless uri_unescape("%7Cabc%e5") eq "|abcå";
+print "ok 4\n";
+
+print "not " unless join(":", uri_unescape("%40A%42", "CDE", "F%47H")) eq
+ '@AB:CDE:FGH';
+print "ok 5\n";
+
+
+
+use URI::Escape qw(%escapes);
+
+print "not" unless $escapes{"%"} eq "%25";
+print "ok 6\n";