[perl #121104] avoid using a less sane find(1)
authorTony Cook <tony@develop-help.com>
Thu, 30 Jan 2014 00:13:41 +0000 (11:13 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 30 Jan 2014 00:18:43 +0000 (11:18 +1100)
t/x2p/find2perl.t

index a057d65..f0dfa03 100644 (file)
@@ -102,7 +102,8 @@ for my $spec (@test_files) {
 }
 
 # do we have a vaguely sane find(1)?
-my @files = sort `find '$tmpdir' -name 'abc' -o -name 'acc'`;
+# BusyBox find is non-POSIX - it doesn't have -links
+my @files = sort `find '$tmpdir' '(' -name 'abc' -o -name 'acc' ')' -a -links +0`;
 @files == 2 && $files[0] =~ /\babc\n\z/ && $files[1] =~ /\bacc\n\z/
     or skip_all("doesn't appear to be a sane find(1)");