File: validate-draft07.t

package info (click to toggle)
libjson-validator-perl 4.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: perl: 2,816; makefile: 14
file content (15 lines) | stat: -rw-r--r-- 442 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Mojo::Base -strict;
use Mojo::File 'path';
use Mojo::JSON 'decode_json';
use Test::More;

use JSON::Validator;

my $draft07 = path(qw(lib JSON Validator cache 4a31fe43be9e23ca9eb8d9e9faba8892));
plan skip_all => "Cannot open $draft07" unless -r $draft07;

my $schema = decode_json($draft07->slurp);
my @errors = JSON::Validator->new->validate($schema, $schema);
ok !@errors, "validated draft07" or map { diag $_ } @errors;

done_testing;