You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two reasons of this breakage for Windows.
Windows doesn't have a reliable inode (see also perlport for the stat portability)
The following kind of hack made the failing tests pass, but I'm not sure this is the best way to go. As you've said in the above tweets, just making the tests skip would be enough.
diff --git a/lib/Sisimai/Mail/Maildir.pm b/lib/Sisimai/Mail/Maildir.pm
--- a/lib/Sisimai/Mail/Maildir.pm
+++ b/lib/Sisimai/Mail/Maildir.pm
@@ -66,6 +66,7 @@ sub read {
# Get inode number of the file
$self->{'path'} = $emailindir;
$emailinode = [stat $emailindir]->[1];
$emailinode = $emailindir if $^O eq 'MSWin32';
next if exists $self->{'inodes'}->{ $emailinode };
$filehandle = IO::File->new($emailindir, 'r');
Some of the tests fail because of the Windows line ending difference (LF/CRLF)
This patch should fix the issue, but the same as above can be applied here, and it might be better to add this binmode to lib/Sisimai/Mail/STDIN.pm as well (as of this writing tests pass without patching it).
https://twitter.com/azumakuniyuki/status/963988522053939200
https://twitter.com/azumakuniyuki/status/963987561046683648
There are two reasons of this breakage for Windows.
stat
portability)The following kind of hack made the failing tests pass, but I'm not sure this is the best way to go. As you've said in the above tweets, just making the tests skip would be enough.
diff --git a/lib/Sisimai/Mail/Maildir.pm b/lib/Sisimai/Mail/Maildir.pm
--- a/lib/Sisimai/Mail/Maildir.pm
+++ b/lib/Sisimai/Mail/Maildir.pm
@@ -66,6 +66,7 @@ sub read {
# Get inode number of the file
$self->{'path'} = $emailindir;
$emailinode = [stat $emailindir]->[1];
This patch should fix the issue, but the same as above can be applied here, and it might be better to add this binmode to lib/Sisimai/Mail/STDIN.pm as well (as of this writing tests pass without patching it).
diff --git a/lib/Sisimai/Mail/Mbox.pm b/lib/Sisimai/Mail/Mbox.pm
index f10db4b..c49816c 100644
--- a/lib/Sisimai/Mail/Mbox.pm
+++ b/lib/Sisimai/Mail/Mbox.pm
@@ -34,6 +34,7 @@ sub new {
$param->{'size'} = -s $argv1;
$param->{'file'} = File::Basename::basename $argv1;
$param->{'handle'} = ref $argv1 ? $argv1 : IO::File->new($argv1, 'r');
binmode $param->{'handle'};
return bless($param, PACKAGE);
}
The text was updated successfully, but these errors were encountered: