Debian lenny version packages
[pkg-perl] / deb-src / libtest-perl-critic-perl / libtest-perl-critic-perl-1.01 / t / 01_api.t
1 #######################################################################
2 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/tags/Test-Perl-Critic-1.01/t/01_api.t $
3 #     $Date: 2007-01-24 22:22:10 -0800 (Wed, 24 Jan 2007) $
4 #   $Author: thaljef $
5 # $Revision: 1183 $
6 ########################################################################
7
8 use strict;
9 use warnings;
10 use Test::More tests => 4;
11 use Test::Perl::Critic;
12 use English qw(-no_match_vars);
13
14 #---------------------------------------------------------------------------
15 # Export tests
16
17 can_ok('main', 'critic_ok');
18 can_ok('main', 'all_critic_ok');
19
20 #---------------------------------------------------------------------------
21 # Test exception for missing files
22
23 eval{ critic_ok('foobar') };
24 ok( defined $EVAL_ERROR );
25
26 #---------------------------------------------------------------------------
27 # Test exception for null file
28
29 eval{ critic_ok() };
30 ok( defined $EVAL_ERROR );
31
32
33