summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2021-02-12 11:18:08 +0100
committerYves Orton <demerphq@gmail.com>2021-02-12 19:21:28 +0100
commit4de2690c76c1d4569e6e698f0cf54b7ec8e183b9 (patch)
treeb58227e2a29c0bab963e67a4bcfb46efd8a48cfd /t
parent19e01a4b5d863a6fbf2322e909618f2ae39e50b3 (diff)
downloadperl-4de2690c76c1d4569e6e698f0cf54b7ec8e183b9.tar.gz
opbasic/arith.t - make sure we use the right Config
We were warning about only using Config::Config once. Digging it seems that the Config module is only loaded under VMS, and the checks on $Config{foo} were checking an empty hash. This changes them to use $Config::Config{foo} so that we use the right hash when Config.pm is required in the VMS code
Diffstat (limited to 't')
-rw-r--r--t/opbasic/arith.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/opbasic/arith.t b/t/opbasic/arith.t
index 0be9c93097..bbf7100dcb 100644
--- a/t/opbasic/arith.t
+++ b/t/opbasic/arith.t
@@ -442,7 +442,8 @@ if ($^O eq 'VMS') {
if ($^O eq 'vos') {
print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n";
}
-elsif ($vms_no_ieee || !$Config{d_double_has_inf}) {
+elsif ($vms_no_ieee || !$Config::Config{d_double_has_inf}) {
+ # note Config.pm is only loaded under VMS and via a require.
print "ok ", $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n"
}
elsif ($^O eq 'ultrix') {
@@ -472,7 +473,8 @@ else {
# [perl #120426]
# small numbers shouldn't round to zero if they have extra floating digits
-unless ($Config{d_double_style_ieee}) {
+# note Config.pm is only loaded under VMS and via a require.
+unless ($Config::Config{d_double_style_ieee}) {
for (1..8) { print "ok ", $T++, " # SKIP -- not IEEE\n" }
} else {
try $T++, 0.153e-305 != 0.0, '0.153e-305';