Browse files

Test what we expect to happen with non ASCII characters.

  • Loading branch information...
1 parent 7aadc18 commit d9518255c0d77bf7843cacfe6b44738767c76059 Dave Lambley committed Dec 14, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 t/util.t
@@ -12,4 +12,12 @@ is(unescape_dn_value("foo"), "foo", "simple, passthrough test, decoding");
is(escape_dn_value("foo,bar"), 'foo\,bar', "with a comma");
is(unescape_dn_value('foo\,bar'), 'foo,bar', "with a comma, decoding");
+my $latin1 = "caf".chr(0xe9);
+is(escape_dn_value($latin1), 'caf\C3\A9', 'latin1');
+is(unescape_dn_value('caf\C3\A9'), $latin1, 'latin1, decoding');
+my $bad_unicode = "mieow ".chr(0x1F638);
+is(escape_dn_value($bad_unicode), 'mieow \F0\9F\98\B8', 'bad unicode');
+is(unescape_dn_value('mieow \F0\9F\98\B8'), $bad_unicode, 'bad unicode, decoding');

0 comments on commit d951825

Please sign in to comment.