#!perl
# Copyright (C) 2005, The Perl Foundation.
# $Id: harness 12838 2006-05-30 14:19:10Z coke $

use strict;
use warnings;
use Test::Harness;
use File::Spec;


my @files;

# Per Leo on 18APR2005, run the test suite with --gc-debug

if ($ENV{TEST_PROG_ARGS} && $ENV{TEST_PROG_ARGS} !~ /\b--gc-debug\b/) {
  $ENV{TEST_PROG_ARGS} .= " --gc-debug"; 
}

if (@ARGV) {
    # Someone specified tests for me to run.
    @files = grep {-f $_} @ARGV
} else {
    # Called with no args, run the full suite.
    @files = glob( File::Spec->catfile( "t", "*.t" ) );
}

exit unless @files;
runtests(@files);
