Skip to content

Commit

Permalink
Skipping more acceptance tests #247
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Henning Thorsen committed Nov 20, 2021
1 parent db4d968 commit bbd8d69
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/JSON/Validator/Schema/Draft201909.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ sub _validate_type_array_contains {
my ($self, $data, $state) = @_;
my ($path, $schema) = @$state{qw(path schema)};
return unless exists $schema->{contains};
return if defined $schema->{minContains} and $schema->{minContains} == 0;
return if defined $schema->{minContains} and $schema->{minContains} == 0 and !$schema->{maxContains};
return if defined $schema->{minContains} and $schema->{minContains} == 0 and !@$data;

my ($n_valid, @e, @errors) = (0);
for my $i (0 .. @$data - 1) {
Expand Down
1 change: 1 addition & 0 deletions t/draft2019-09-acceptance.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ push @todo_tests, ['', 'float and integers are equal up to 64-bit
push @todo_tests, ['defs.json', 'invalid definition'];
push @todo_tests, ['defs.json', 'validate definition against metaschema'];
push @todo_tests, ['id.json', '$id inside an enum is not a real identifier'];
push @todo_tests, ['ref.json', '$ref prevents a sibling $id from changing the base uri'];
push @todo_tests, ['ref.json', 'ref creates new scope when adjacent to keywords'];
push @todo_tests, ['ref.json', 'remote ref, containing refs itself', 'remote ref invalid'];
push @todo_tests, ['ref.json', 'refs with relative uris and defs'];
Expand Down
3 changes: 2 additions & 1 deletion t/draft4-acceptance.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ plan skip_all => 'TEST_ACCEPTANCE=1' unless $ENV{TEST_ACCEPTANCE};
delete $ENV{TEST_ACCEPTANCE} if $ENV{TEST_ACCEPTANCE} eq '1';

my @todo_tests;
push @todo_tests, ['id.json', 'id inside an enum is not a real identifier'];
push @todo_tests, ['id.json', 'id inside an enum is not a real identifier'];
push @todo_tests, ['ref.json', '$ref prevents a sibling id from changing the base uri'];

t::Helper->acceptance('JSON::Validator::Schema::Draft4', todo_tests => \@todo_tests);

Expand Down
1 change: 1 addition & 0 deletions t/draft6-acceptance.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ delete $ENV{TEST_ACCEPTANCE} if $ENV{TEST_ACCEPTANCE} eq '1';
my @todo_tests;
push @todo_tests, ['id.json', 'id inside an enum is not a real identifier'];
push @todo_tests, ['const.json', 'float and integers are equal up to 64-bit representation limits'];
push @todo_tests, ['ref.json', '$ref prevents a sibling $id from changing the base uri'];
push @todo_tests, ['refRemote.json', 'remote ref with ref to definitions'];
push @todo_tests, ['unknownKeyword.json', '$id inside an unknown keyword is not a real identifier'];

Expand Down
1 change: 1 addition & 0 deletions t/draft7-acceptance.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ delete $ENV{TEST_ACCEPTANCE} if $ENV{TEST_ACCEPTANCE} eq '1';
my @todo_tests;
push @todo_tests, ['id.json', 'id inside an enum is not a real identifier'];
push @todo_tests, ['const.json', 'float and integers are equal up to 64-bit representation limits'];
push @todo_tests, ['ref.json', '$ref prevents a sibling $id from changing the base uri'];
push @todo_tests, ['refRemote.json', 'remote ref with ref to definitions'];
push @todo_tests, ['unknownKeyword.json', '$id inside an unknown keyword is not a real identifier'];

Expand Down

0 comments on commit bbd8d69

Please sign in to comment.