From 5ceaabe8e4e93dd375a9f43ffc52956b89ed492d Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Sat, 4 Aug 2012 14:01:27 +0100 Subject: [PATCH] Remove CR characters from raw input in op/magic.t on Windows The :raw input added by e2e1d5ce8b broke tests on Windows by introducing unexpeted CR characters. Two tests (154 and 157) currently still fail on Windows if the (DOS) command prompt is using a different code page to perl's native (Windows) character set. --- t/op/magic.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/op/magic.t b/t/op/magic.t index 3a620aa..ebf99a7 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -70,7 +70,8 @@ sub env_is { if ($Is_MSWin32) { # cmd.exe will echo 'variable=value' but 4nt will echo just the value # -- Nikola Knezevic - like `set $key`, qr/^(?:\Q$key\E=)?\Q$val\E$/, $desc; + (my $set = `set $key`) =~ s/\r\n$/\n/; + like $set, qr/^(?:\Q$key\E=)?\Q$val\E$/, $desc; } elsif ($Is_VMS) { is `write sys\$output f\$trnlnm("\Q$key\E")`, "$val\n", $desc; } else { -- 2.7.4