Hi Dave, thanks for your quick feedback!
On Tue Mar 01 09:34:22 2011, dfs@roaringpenguin.com wrote:
Show quoted text> I suspect the problem is in t/attachment-filename-encoding.t here:
>
> $parser->output_under('/tmp');
Of course. Here's a patch I created for your test, using the File::Temp
module. File::Temp is a core module (and has been at least since 5.6.1)
and this makes the tests both run succesfully on my Fedora laptop and on
my Win2008R2 server.
Thanks,
Mike
--- t/attachment-filename-encoding.t.orig 2011-03-01 16:08:09.976277187
+0100
+++ t/attachment-filename-encoding.t 2011-03-01 16:09:08.652765481 +0100
@@ -3,6 +3,7 @@
use strict;
use warnings;
use Test::More;
+use File::Temp;
use utf8;
binmode STDOUT, ":utf8";
@@ -44,9 +45,10 @@
# CPAN ticket #65162
# We need the default parser to tickle the bug
+ my $dir = File::Temp->newdir();
$parser = MIME::Parser->new();
$parser->output_to_core(0);
- $parser->output_under('/tmp');
+ $parser->output_under($dir);
$entity = $parser->parse_data("From: test\@example.com\nSubject:
test\nDate: Tue, 25 Jan 2011 14:35:04 +0100\nMessage-Id:
<123\@example.com>\nContent-Type: text/plain;
name*=utf-8''%CE%B2CURE%2Etxt\n\ntest\n");
$filename = $entity->head->recommended_filename;
is(utf8::is_utf8($filename), 1, "Parsed filename should have UTF-8
flag on");