/xt/98_perlcritic.t

http://github.com/http-engine/HTTP-Engine · Raku · 15 lines · 14 code · 1 blank · 0 comment · 6 complexity · 11649c0c388c120d571ef8dc6d8777bc MD5 · raw file

  1. use strict;
  2. use Test::More;
  3. if (! $ENV{TEST_CRITIC}) {
  4. plan(skip_all => "Set TEST_CRITIC environment variable to run this test");
  5. } else {
  6. eval {
  7. require Test::Perl::Critic;
  8. require Perl::Critic;
  9. die "oops. very old." if $Perl::Critic::VERSION < 1.082;
  10. Test::Perl::Critic->import( -profile => 'xt/perlcriticrc');
  11. };
  12. plan skip_all => "Test::Perl::Critic >= 1.082 is not installed." if $@;
  13. all_critic_ok('lib');
  14. }