t/op/filetest.t: On Android, don't try checking if ln exists with which
authorBrian Fraser <fraserbn@gmail.com>
Mon, 12 Aug 2013 00:00:26 +0000 (21:00 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:23 +0000 (14:44 -0300)
Assume that it does -- even the most barebone of toolbox binaries
provides ln, but not which.

t/op/filetest.t

index 3ee50f1..a67b73f 100644 (file)
@@ -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');