On Jan 26, 2009, at 10:54 PM, David E. Wheeler wrote:

TAP::Harness->new({
   verbosity => $opts->{verbose} || $ENV{TEST_VERBOSE},
   timer     => $opts->{timer},
   color     => $opts->{color},
   exec      => ['psql', '-c' 'SELECT * FROM tap.runtest()'],
})->runtests();

The issue with this is that, currently, no tests will be run because nothing is passed to runtests()! Is there something I could pass that runtest() wouldn't stat or parse but would run the `exec` command anyway?

I can almost do it like this:


TAP::Harness->new({
   verbosity => $opts->{verbose} || $ENV{TEST_VERBOSE},
   timer     => $opts->{timer},
   color     => $opts->{color},
   exec      => ['psql', '-c'],
})->runtests('SELECT * FROM tap.runtest()');

However, TAP::Parser only wants raw TAP or a file name. If it's not a file name, it says "No such file or directory." I really want to avoid this. Andy, is there no way to specify that a test isn't a file? Or for me to use

   exec      => ['psql', '-c' 'SELECT * FROM tap.runtest()'],

and then call runtests() with no arguments, and have it call that script once?

Thanks,

David

Reply via email to