blib/lib/Test/TestLister.pl untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
usage
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl -w
2  
3 use strict;
4  
5 use Getopt::Long;
6 use Test::Unit::Loader;
7  
8 my %opts = ();
9 GetOptions(\%opts, 'help', 'testcases');
10 usage() if $opts{help};
11  
12 foreach my $test (@ARGV) {
13 my $suite = Test::Unit::Loader::load($test);
14 print join '', @{ $suite->list($opts{testcases}) };
15 }
16
17 sub usage {
18 die <<EOF;
19 Usage: $0 [ OPTIONS ] <TEST> [ <TEST> ... ]
20  
21 Options:
22 --testcases, -t List testcases contained in (sub)suites
23 --help, -h
24  
25 Tests can be package names or file names.
26 EOF
27 }