diff options
author | Dominic Hargreaves <dom@earth.li> | 2016-06-05 11:44:51 +0100 |
---|---|---|
committer | Dominic Hargreaves <dom@earth.li> | 2016-06-05 11:44:51 +0100 |
commit | f71079d3db9617c58ae7b6af4dbc508997966529 (patch) | |
tree | 8188956eb9e1b0a3962cd1eac27cc6f3529a8d32 /dist | |
parent | 21866d1330b560599ac45bc24574bbd830e59a37 (diff) | |
download | perl-f71079d3db9617c58ae7b6af4dbc508997966529.tar.gz |
constant: don't skip the E2BIG test on Hurd, but improve comments
As Father Chrysostomos explained on [perl #128319] the previous change
was based on a misunderstanding of the purpose of the test, which is
only to test that constant.pm can create a dualvar out of $! which
has an error string, and nothing specifically to do with E2BIG.
The new comments, also suggested by Father Chrysostomos, make this more
clear.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/constant/t/constant.t | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/dist/constant/t/constant.t b/dist/constant/t/constant.t index 6bf0da95aa..442b81963c 100644 --- a/dist/constant/t/constant.t +++ b/dist/constant/t/constant.t @@ -92,14 +92,13 @@ is ZERO3, '0.0'; cmp_ok(abs(PI - 3.1416), '<', 0.0001); is Other::PI, 3.141; -SKIP: { - skip "GNU/Hurd doesn't use 7 as E2BIG", 2 if $^O eq "gnu"; - use constant E2BIG => $! = 7; - cmp_ok E2BIG, '==', 7; - # This is something like "Arg list too long", but the actual message - # text may vary, so we can't test much better than this. - cmp_ok length(E2BIG), '>', 6; -} +# Test that constant.pm can create a dualvar out of $! +use constant A_DUALVAR_CONSTANT => $! = 7; +cmp_ok A_DUALVAR_CONSTANT, '==', 7; +# Make sure we have an error message string. It does not +# matter that 7 means different things on different platforms. +# If this test fails, then either constant.pm or $! is broken: +cmp_ok length(A_DUALVAR_CONSTANT), '>', 6; is @warnings, 0 or diag join "\n- ", "unexpected warning:", @warnings; @warnings = (); # just in case |