Add ARM files
[dh-make-perl] / dev / arm / libfile-which-perl / libfile-which-perl-0.05 / t / all.t
diff --git a/dev/arm/libfile-which-perl/libfile-which-perl-0.05/t/all.t b/dev/arm/libfile-which-perl/libfile-which-perl-0.05/t/all.t
new file mode 100644 (file)
index 0000000..44c0520
--- /dev/null
@@ -0,0 +1,28 @@
+
+use Test;
+BEGIN { plan tests => 3 }
+use File::Which qw(which where);
+
+# So let's try using test-bin, huh?
+
+my $Is_VMS    = ($^O eq 'VMS');
+my $Is_MacOS  = ($^O eq 'MacOS');
+my $Is_DOSish = (($^O eq 'MSWin32') or
+                ($^O eq 'dos')     or
+                ($^O eq 'os2'));
+my $Is_Cygwin = $^O eq 'cygwin';
+
+{
+  chdir 't' if (-d 't');
+  local $ENV{PATH} = 'test-bin';
+  
+  if (not ($Is_VMS or $Is_MacOS or $Is_DOSish)) { # dunno about VMS
+      chmod 0755, "test-bin/all";
+  }
+
+  my @result = which('all');
+  ok($result[0], qr/all/i);
+  ok(@result > 0, 1);
+  ok(scalar @result, scalar where('all')); # should have as many elements.
+
+}