summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-05-13 20:55:09 -0600
committerKarl Williamson <khw@cpan.org>2014-05-31 21:22:48 -0600
commit10225cc45e84565b4226e605f73f8853179cf2a4 (patch)
tree9c5274e61f587864173dc141c5879325a2419c5f /t
parent68021d02ea9fac414986d2a4edb9f9adc0ca4f53 (diff)
downloadperl-10225cc45e84565b4226e605f73f8853179cf2a4.tar.gz
run/locale.t: Add explanation for when tests fail
Commit ff4377fe256e32a3bc10175c01dd6c68c9ce7ddb silenced some irrelevant warnings that occur from some sh programs on some systems. It does this by closing STDERR. That is fine unless the test fails. This commit changes things so that a failure now outputs a diagnostic note about how to see the test failure details. It would be better to automaticallty rerun the test with STDERR open when this happens, but that is more effort than it's worth IMO, given the likely rarity of the failures here.
Diffstat (limited to 't')
-rw-r--r--t/run/locale.t14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/run/locale.t b/t/run/locale.t
index 5e72526bc6..6301734bb3 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -215,7 +215,7 @@ EOF
local $ENV{LANG} = $different;
# Can't turn off the warnings, so send them to /dev/null
- fresh_perl_is(<<"EOF", "$difference", { stderr => "devnull" },
+ if (! fresh_perl_is(<<"EOF", "$difference", { stderr => "devnull" },
if (\$ENV{LC_ALL} ne "invalid") {
# Make the test pass if the sh didn't accept the ENV set
print "$difference\n";
@@ -227,7 +227,10 @@ EOF
my \$in = 4.2;
printf("%g", \$in);
EOF
- "LANG is used if LC_ALL, LC_NUMERIC are invalid");
+ "LANG is used if LC_ALL, LC_NUMERIC are invalid"))
+ {
+ note "To see details change this .t to not close STDERR";
+ }
}
SKIP: {
@@ -241,7 +244,7 @@ EOF
local $ENV{LANG} = "invalid";
# Can't turn off the warnings, so send them to /dev/null
- fresh_perl_is(<<"EOF", 4.2, { stderr => "devnull" },
+ if (! fresh_perl_is(<<"EOF", 4.2, { stderr => "devnull" },
if (\$ENV{LC_ALL} ne "invalid") {
print "$difference\n";
exit 0;
@@ -252,7 +255,10 @@ EOF
my \$in = 4.2;
printf("%g", \$in);
EOF
- 'C locale is used if LC_ALL, LC_NUMERIC, LANG are invalid');
+ 'C locale is used if LC_ALL, LC_NUMERIC, LANG are invalid'))
+ {
+ note "To see details change this .t to not close STDERR";
+ }
}
}