diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-08-11 21:00:26 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-26 14:44:23 -0300 |
commit | 19d2bdc17e5767261b03cec04e2fbb690cdf67be (patch) | |
tree | c9eec565b4b1681abcf684d71a4d935651f32245 /t | |
parent | a75b628df5e30a63c73f5412bbd17648b0eb847e (diff) | |
download | perl-19d2bdc17e5767261b03cec04e2fbb690cdf67be.tar.gz |
t/op/filetest.t: On Android, don't try checking if ln exists with which
Assume that it does -- even the most barebone of toolbox binaries
provides ln, but not which.
Diffstat (limited to 't')
-rw-r--r-- | t/op/filetest.t | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t index 3ee50f1b2d..a67b73f3ce 100644 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -99,8 +99,15 @@ like $@, qr/^The stat preceding -l _ wasn't an lstat at /, SKIP: { use Perl::OSType 'os_type'; if (os_type ne 'Unix') { skip "Not Unix", 3 } - chomp(my $ln = `which ln`); - if ( ! -e $ln ) { skip "No ln" , 3 } + if ( $^O =~ /android/ ) { + # Even the most basic toolbox in android provides ln, + # but not which. + $ln = "ln"; + } + else { + chomp(my $ln = `which ln`); + if ( ! -e $ln ) { skip "No ln" , 3 } + } lstat $ro_empty_file; `ln -s $ro_empty_file 1`; isnt(-l -e _, 1, 'stacked -l uses previous stat, not previous retval'); |