asql-1.7/ 0000755 0001750 0001750 00000000000 12024306563 010516 5 ustar skx skx asql-1.7/t/ 0000755 0001750 0001750 00000000000 12024306562 010760 5 ustar skx skx asql-1.7/t/perl-syntax.t 0000644 0001750 0001750 00000002514 12024306562 013435 0 ustar skx skx #!/usr/bin/perl -w
#
# Test that every perl file we have passes the syntax check.
#
# Steve
# --
#
use strict;
use File::Find;
use Test::More qw( no_plan );
#
# Find all the files beneath the current directory,
# and call 'checkFile' with the name.
#
find( { wanted => \&checkFile, no_chdir => 1 }, '.' );
#
# Check a file.
#
# If this is a perl file then call "perl -c $name", otherwise
# return
#
sub checkFile
{
# The file.
my $file = $File::Find::name;
# We don't care about directories
return if ( ! -f $file );
# `modules.sh` is a false positive.
return if ( $file =~ /modules.sh$/ );
# See if it is a perl file.
my $isPerl = 0;
# Read the file.
open( INPUT, "<", $file );
foreach my $line ( )
{
if ( $line =~ /\/usr\/bin\/perl/ )
{
$isPerl = 1;
}
}
close( INPUT );
#
# Return if it wasn't a perl file.
#
return if ( ! $isPerl );
#
# Now run 'perl -c $file' to see if we pass the syntax
# check. We add a couple of parameters to make sure we're
# really OK.
#
# use strict "vars";
# use strict "subs";
#
my $retval = system( "perl -Mstrict=subs -Mstrict=vars -c $file 2>/dev/null >/dev/null" );
is( $retval, 0, "Perl file passes our syntax check: $file" );
}
asql-1.7/t/modules.sh 0000755 0001750 0001750 00000001064 12024306562 012770 0 ustar skx skx #!/bin/sh
#
# Automatically attempt to create a test which ensures all the modules
# used in the code are availabe.
#
# Steve
# --
# http://www.steve.org.uk/
#
#
cat <