Test::Sah - Test data against Sah schema
This document describes version 0.020 of Test::Sah (from Perl distribution Test-Sah), released on 2020-03-01.
use Test::More; use Test::Sah; # exports is_valid() and is_invalid() is_valid ({}, [hash => keys=>{a=>"int", b=>"str"}]); # ok is_invalid([], [array => {min_len=>1}]); # ok done_testing;
This module is a proof of concept. It provides is_valid() and is_invalid() to test data structure against Sah schema.
is_valid()
is_invalid()
All these functions are exported by default.
Test that $data validates to $schema.
$data
$schema
Test that $data does not validate to $schema.
Please visit the project's homepage at https://metacpan.org/release/Test-Sah.
Source repository is at https://github.com/perlancar/perl-Test-Sah.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Sah
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.
Test::Sah::Schema to test Sah schema modules.
Data::Sah
Sah
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020, 2012 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.
To install Test::Sah, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Sah
CPAN shell
perl -MCPAN -e shell install Test::Sah
For more information on module installation, please visit the detailed CPAN module installation guide.