$s //= $part->body;
$s =~ s/\r\n/\n/gs; # TODO: consider \r+\n to match View
$s =~ s/\s*\z//s;
- write_file '>:utf8', "$self->{curdir}/$idx.$sfx", $s;
+ write_file '>:utf8', "$self->{curdir}/$idx.$sfx", $s, "\n";
}
# public
ok(!lei('mail-diff', 't/data/0001.patch', 't/data/binary.patch'),
'different messages are different');
like($lei_out, qr/^\+/m, 'diff shown');
+ unlike $lei_out, qr/No newline at end of file/;
lei_ok('mail-diff', 't/data/0001.patch', 't/data/0001.patch');
is($lei_out, '', 'no output if identical');
});
'cr_mismatch is only diff context');
like($raw, qr!>\-pipe !s, 'pipe diff del line');
like($raw, qr!>\+pipe !s, 'pipe diff ins line');
+ unlike $raw, qr/No newline at end of file/;
};
test_psgi(sub { $www->call(@_) }, $client1);