root/test/t/000_prereq.t

Revision 57156325b280cf0021706459de269ef44b89d8cc, 325 bytes (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

some basic scaffolding for noit tests, refs #230

  • Property mode set to 100644
Line 
1 use Test::More tests => 4;
2 my @progs = qw/pg_ctl initdb psql rm/;
3
4 use strict;
5
6 foreach my $prog (@progs) {
7   my $found = 0;
8   foreach my $dir (split /:/, $ENV{PATH}) {
9     $found = $dir if -x "$dir/$prog";
10   }
11   BAIL_OUT("$prog is required, but not in your path") unless($found);
12   ok($found, "found $prog ($found)");
13 }
14
15 1;
Note: See TracBrowser for help on using the browser.