summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-25 14:20:03 +0100
committerYves Orton <demerphq@gmail.com>2023-03-29 20:54:49 +0800
commita030daf270f04b14c0b75d5da79bbef6e7038de1 (patch)
tree97da401374d84cdf32c9291eff45112334dc2b00 /t
parent3cfe6d102c50c7cdd639b841ad10a8a86cc2cbbb (diff)
downloadperl-a030daf270f04b14c0b75d5da79bbef6e7038de1.tar.gz
t/porting/globvar.t - fix for HPUX
On HPUX `nm globals.o` produces output like this (without the indent): [5] | 2420| 2|OBJT |GLOB |0| .rodata|PL_Yes So change the $define qr// to accommodate it. We also have to TODO some of the tests, as HPUX seems to export everything.
Diffstat (limited to 't')
-rw-r--r--t/porting/globvar.t8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/porting/globvar.t b/t/porting/globvar.t
index 3e6d630c43..b4480df6d8 100644
--- a/t/porting/globvar.t
+++ b/t/porting/globvar.t
@@ -27,7 +27,7 @@ my $yes = `$trial`;
skip_all("Could not run `$trial`") if $?;
-my $defined = qr/^[0-9a-fA-F]{8,16}\s+[^Uu]\s+_?/m;
+my $defined = $^O eq "hpux" ? qr/\|/ : qr/^[0-9a-fA-F]{8,16}\s+[^Uu]\s+_?/m;
skip_all("Could not spot definition of PL_Yes in output of `$trial`")
unless $yes =~ /${defined}PL_Yes/m;
@@ -75,10 +75,14 @@ foreach (sort keys %exported) {
}
}
+$::TODO = $::TODO; # silence uninitialized warnings
foreach (sort keys %unexported) {
SKIP: {
skip("We don't export '$_'", 1) if $skip{$_};
- fail("'$_' is defined, but we do not export it");
+ TODO: {
+ local $::TODO = "HPUX exports everything" if $^O eq "hpux";
+ fail("'$_' is defined, but we do not export it");
+ }
}
}