What are the recommended practices in adapting .t files to be
independent of the newline style?
I've seen various tests fail on Windows because they end up expecting
\n and get \r\n. For example, in Email::MIME::Modifier's t/encoding.t:
# $email->encoding_set('base64');
# is $email->body, qq[Hello World!\nI like you!\n], 'base64 works'; #
test passes
# is $email->body_raw, qq[SGVsbG8gV29ybGQhCkkgbGlrZSB5b3UhCg==\n],
'base64 raw works'; # test fails on Windows
Conditional testing on $^O eq 'MSWin32'? Seems like a hack.
Thanks,
Dan
Thread Next