File: live-data-sanity.t

package info (click to toggle)
libtest-json-schema-acceptance-perl 1.003%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 652 kB
  • sloc: perl: 521; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# vim: set ft=perl ts=8 sts=2 sw=2 tw=100 et :
use strict;
use warnings;
no if "$]" >= 5.031009, feature => 'indirect';

use Test::More 0.88;
use Test::Warnings;
use Try::Tiny;
use Path::Tiny;
use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
use Test::JSON::Schema::Acceptance;

my $test_dir = path(File::ShareDir::dist_dir('Test-JSON-Schema-Acceptance'), 'tests');

foreach my $draft (sort $test_dir->children) {
  my $accepter = Test::JSON::Schema::Acceptance->new(specification => $draft->basename);
  is((try { $accepter->_test_data; undef } catch { $_ }), undef, 'no errors loading data for '.$draft->basename);
}

done_testing;