CC: | Jesse Vincent <jesse [...] bestpractical.com> |
Subject: | [PATCH] Whatever your feeling on whether I'm misusing encode, the two new tests _should_ have the same output. |
Date: | Fri, 10 Apr 2009 13:12:51 -0400 |
To: | bug-Digest-MD5 [...] rt.cpan.org |
From: | Jesse Vincent <jesse [...] bestpractical.com> |
Right now, #4 passes for me on 5.8.9 and #5 fails.
---
t/utf8.t | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/t/utf8.t b/t/utf8.t
index 6cf68b7..a0cdb1f 100644
--- a/t/utf8.t
+++ b/t/utf8.t
@@ -7,7 +7,7 @@ BEGIN {
}
}
-print "1..3\n";
+print "1..5\n";
use strict;
use Digest::MD5 qw(md5_hex);
@@ -33,3 +33,18 @@ print "ok 2\n";
# reference
print "not " unless md5_hex("foo\xFF") eq $exp;
print "ok 3\n";
+
+# autopromotion
+
+my $unistring = "Oslo.pm har sosialt medlemsmøte onsdag 1. April 2008, klokken 18:30. Vi treffes på Marhaba Café, Keysersgate 1.";
+use Devel::Peek;
+use Encode;
+$unistring = Encode::decode_utf8($unistring);
+print "not " if ( not utf8::is_utf8($unistring));
+print "ok 4\n";
+
+md5_hex($unistring);
+print "not " if ( not utf8::is_utf8($unistring));
+print "ok 5\n"
+
+
--
1.6.2.2