This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
skip the failing hexfloat test if it fails on NetBSD
authorTony Cook <tony@develop-help.com>
Wed, 17 Jun 2020 02:07:19 +0000 (02:07 +0000)
committerSawyer X <xsawyerx@cpan.org>
Sat, 20 Jun 2020 16:30:29 +0000 (19:30 +0300)
perl (in theory) supports C89, where expl() doesn't exist (though
long doubles do), so our tests shouldn't fail if expl() isn't
available.

Of course, the NetBSD libm does supply an implementation of expl(),
it's just not a long double implementation.

t/op/sprintf2.t

index af448cd..7cb5d9b 100644 (file)
@@ -684,6 +684,13 @@ for my $t (@hexfloat) {
             }
         }
     }
+    if (!$ok && $^O eq "netbsd" && $t->[1] eq "exp(1)") {
+      SKIP:
+        {
+            skip "NetBSD's expl() is just exp() in disguise", 1;
+        }
+        next;
+    }
     ok($ok, "'$format' '$arg' -> '$result' cf '$expected'");
 }