This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a12509
)
t/op/taint.t: handle symlink requiring anything unavailable
author
Tony Cook
<tony@develop-help.com>
Wed, 28 Oct 2020 02:46:01 +0000
(13:46 +1100)
committer
Tony Cook
<tony@develop-help.com>
Tue, 1 Dec 2020 04:29:33 +0000
(15:29 +1100)
like privileges, or a filesystem without symlink support
t/op/taint.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/taint.t
b/t/op/taint.t
index
73246a0
..
607a305
100644
(file)
--- a/
t/op/taint.t
+++ b/
t/op/taint.t
@@
-1498,7
+1498,11
@@
violates_taint(sub { link $TAINT, '' }, 'link');
unlink($symlink);
my $sl = "/something/naughty";
# it has to be a real path on Mac OS
- symlink($sl, $symlink) or die "symlink: $!\n";
+ unless (symlink($sl, $symlink)) {
+ skip "symlink not available or no priviliges", 1,
+ if $^O eq "MSWin32";
+ die "symlink: $!\n";
+ }
my $readlink = readlink($symlink);
is_tainted($readlink);
unlink($symlink);