Skip to content

Commit 21866d1

Browse files
committed
constant: skip E2BIG test on GNU/Hurd
Hurd doesn't use 7 for E2BIG, so this string test would fail if the test itself were more precise.
1 parent 37808b0 commit 21866d1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dist/constant/t/constant.t

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,14 @@ is ZERO3, '0.0';
9292
cmp_ok(abs(PI - 3.1416), '<', 0.0001);
9393
is Other::PI, 3.141;
9494

95-
use constant E2BIG => $! = 7;
96-
cmp_ok E2BIG, '==', 7;
97-
# This is something like "Arg list too long", but the actual message
98-
# text may vary, so we can't test much better than this.
99-
cmp_ok length(E2BIG), '>', 6;
95+
SKIP: {
96+
skip "GNU/Hurd doesn't use 7 as E2BIG", 2 if $^O eq "gnu";
97+
use constant E2BIG => $! = 7;
98+
cmp_ok E2BIG, '==', 7;
99+
# This is something like "Arg list too long", but the actual message
100+
# text may vary, so we can't test much better than this.
101+
cmp_ok length(E2BIG), '>', 6;
102+
}
100103

101104
is @warnings, 0 or diag join "\n- ", "unexpected warning:", @warnings;
102105
@warnings = (); # just in case

0 commit comments

Comments
 (0)