File: test.pl

package info (click to toggle)
libdevel-refactor-perl 0.05-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 132 kB
  • sloc: perl: 520; makefile: 2
file content (32 lines) | stat: -rwxr-xr-x 737 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl
#
# $Header: $
#
##############################################################################

use strict;
use FindBin qw($Bin);
use lib "$Bin";  # Add the current directory to the start of @INC

use Test::Harness qw( runtests $verbose );

$Test::Harness::verbose = 1;

my @tests;
if ($#ARGV >= 0) {
    while (my $testName  = shift @ARGV) {
        $testName .= ".t" unless ($testName =~ /\.t$/);
        push @tests, "t/".$testName;
    }
} else {
    opendir(DIR, "t") || die "can't opendir test directory t: $!";
    while(defined (my $file = readdir(DIR)) ) {
        next unless ($file =~ /^.*?\.t$/) && (!($file =~ /^template/));
        push @tests, "t/".$file;
    }
    closedir DIR;
}

runtests(@tests);

1;