2011-06-27 16:13:31 -04:00
|
|
|
# #!/usr/bin/perl
|
|
|
|
|
|
|
|
# use test classes
|
|
|
|
snippet tuse
|
|
|
|
use Test::More;
|
|
|
|
use Test::Deep;
|
|
|
|
use Test::Exception;
|
|
|
|
|
|
|
|
# local test lib
|
|
|
|
snippet tlib
|
|
|
|
use lib qw{ ./t/lib };
|
|
|
|
|
|
|
|
#test methods
|
|
|
|
snippet tmeths
|
|
|
|
$ENV{TEST_METHOD} = '${1:regex}';
|
|
|
|
|
|
|
|
# runtestclass
|
|
|
|
snippet trunner
|
|
|
|
use ${1:test_class};
|
|
|
|
$1->runtests();
|
|
|
|
|
|
|
|
#testclass
|
|
|
|
snippet tsub
|
2011-08-29 02:52:36 -04:00
|
|
|
sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {
|
2011-06-27 16:32:23 -04:00
|
|
|
my $self = shift;
|
2011-06-27 16:13:31 -04:00
|
|
|
${4:# body}
|
|
|
|
|
2011-08-29 02:52:36 -04:00
|
|
|
}
|
2011-06-27 16:13:31 -04:00
|
|
|
|
|
|
|
|
2011-06-27 16:32:23 -04:00
|
|
|
#prep test method
|
|
|
|
snippet tprep
|
2011-08-29 02:52:36 -04:00
|
|
|
sub prep${1:number}_${2:test_case} :Test(startup) {
|
2011-06-27 16:32:23 -04:00
|
|
|
my $self = shift;
|
|
|
|
${4:# body}
|
2011-08-29 02:52:36 -04:00
|
|
|
}
|