#!perl

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2020-03-04'; # DATE
our $DIST = 'Test-Sah-Schema'; # DIST
our $VERSION = '0.005'; # VERSION

use 5.010001;
use strict;
use warnings;

use Getopt::Long qw(:config bundling no_ignore_case auto_help auto_version);
use Test::Sah::Schema;

my %opts = (
    exclude_modules => [],
    include_modules => [],
    test_schema_examples => 1,
);
GetOptions(
    'include-module=s' => $opts{include_modules},
    '<>' => sub {
        push @{ $opts{include_modules} }, $_[0];
    },
    'exclude-module=s' => $opts{exclude_modules},
    'E' => sub { $opts{test_schema_examples} = 0 },
);

sah_schema_modules_ok(
    \%opts,
);

1;
# ABSTRACT: Test all Schema modules in distribution
# PODNAME: test-sah-schema-modules

__END__

=pod

=encoding UTF-8

=head1 NAME

test-sah-schema-modules - Test all Schema modules in distribution

=head1 VERSION

This document describes version 0.005 of test-sah-schema-modules (from Perl distribution Test-Sah-Schema), released on 2020-03-04.

=head1 SYNOPSIS

In your dist directory:

 % test-sah-schema-modules [options] [included_module]...

Examples:

 # test all Sah::Schema modules in dist
 % test-sah::schema-modules

 # only test a single Sah::Schema module
 % test-sah::schema-modules --include-module date::tz_offset

 # only test a couple of Sah::Schema modules
 % test-sah::schema-modules date::tz_offset date::tz_name

=head1 DESCRIPTION

This script is a command-line interface for L<Test::Sah::Schema>'s
C<sah_schema_modules_ok()> function.

=head1 OPTIONS

=over

=item * --include-modules=s

Include a module. Can be specified multiple times. If specified then only
included modules will be tested.

=item * --exclude-modules=s

Exclude a module. Can be specified multiple times.

=item * -E

This sets C<test_schema_examples> to 0.

=back

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Test-Sah-Schema>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Test-Sah-Schema>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Sah-Schema>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 SEE ALSO

L<Test::Sah::Schema>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
