#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

plan skip_all => 'set RELEASE_TESTING=1 to run kwalitee tests'
    unless $ENV{RELEASE_TESTING};

# kwalitee_ok needs META.yml at the cwd (generated by `make dist`, not by
# `make` alone). Skip rather than fail when run from a source tree.
plan skip_all => 'no META.yml in cwd; run after `make dist`'
    unless -f 'META.yml';

eval { require Test::Kwalitee };
plan skip_all => 'Test::Kwalitee not installed' if $@;

# Test::Kwalitee->import runs the checks and emits its own plan +
# done_testing; calling kwalitee_ok() afterwards would re-run them.
Test::Kwalitee->import;
