From: David Kamholz Date: Sat, 11 Feb 2006 21:14:57 +0000 (+0000) Subject: - add gen-tests.pl script X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3c7b079f350a322f5849e5ee2f7a6ea7c654fb3;p=dbsrgits%2FDBIx-Class-Historic.git - add gen-tests.pl script - add test missed last time --- diff --git a/maint/gen-tests.pl b/maint/gen-tests.pl new file mode 100644 index 0000000..f83fd55 --- /dev/null +++ b/maint/gen-tests.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +die "must be run from DBIx::Class root dir" unless -d 't/run'; + +gen_tests($_) for qw/BasicRels HelperRels/; + +sub gen_tests { + my $variant = shift; + my $dir = lc $variant; + system("rm -f t/$dir/*.t"); + + foreach my $test (map { m[^t/run/(.+)\.tl$]; $1 } split(/\n/, `ls t/run/*.tl`)) { + open(my $fh, '>', "t/$dir/${test}.t") or die $1; + print $fh <<"EOF"; +use Test::More; +use lib qw(t/lib); +use DBICTest; +use DBICTest::$variant; + +require "t/run/${test}.tl"; +run_tests(DBICTest->schema); +EOF + close $fh; + } +} \ No newline at end of file diff --git a/t/helperrels/145db2.t b/t/helperrels/145db2.t new file mode 100644 index 0000000..c6925ef --- /dev/null +++ b/t/helperrels/145db2.t @@ -0,0 +1,7 @@ +use Test::More; +use lib qw(t/lib); +use DBICTest; +use DBICTest::HelperRels; + +require "t/run/145db2.tl"; +run_tests(DBICTest->schema);