Skip to content

Commit 72428aa

Browse files
adjust acceptance tests for recent changes
more hostname tests that are problematic and require addressing
1 parent 9d1de14 commit 72428aa

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Revision history for JSON-Schema-Modern
22

33
{{$NEXT}}
44
- allow export of JSON::Schema::Modern::Utilities::is_bool
5+
- adjust acceptance tests to handle new failure cases in the test
6+
suite for the hostname format
57

68
0.621 2025-10-30 17:56:52Z
79
- adjust acceptance tests to handle new failure cases in the test

t/zzz-acceptance-draft2019-09-format.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ acceptance_tests(
7070
!$ENV{AUTHOR_TESTING} && !eval { require Net::IDN::Encode; 1 } ? 'idn-hostname.json' : (),
7171
] },
7272
# various edge cases that are difficult to accomodate
73-
{ file => 'hostname.json', group_description => 'validation of host names', test_description => 'trailing dot' },
73+
{ file => 'hostname.json', group_description => 'validation of host names', test_description => [ 'trailing dot', 'contains "--" in the 3rd and 4th position' ] },
74+
{ file => 'hostname.json', group_description => 'validation of A-label (punycode) host names' },
7475
{ file => 'iri.json', group_description => 'validation of IRIs', # see test suite issue 395
7576
test_description => 'an invalid IRI based on IPv6' },
7677
{ file => 'idn-hostname.json',

t/zzz-acceptance-draft2020-12-format.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ acceptance_tests(
7171
] },
7272
# various edge cases that are difficult to accomodate
7373
{ file => 'email.json', group_description => 'validation of e-mail addresses', test_description => [ 'an invalid domain', 'an invalid IPv4-address-literal' ] },
74-
{ file => 'hostname.json', group_description => 'validation of host names', test_description => 'trailing dot' },
74+
{ file => 'hostname.json', group_description => 'validation of host names', test_description => [ 'trailing dot', 'contains "--" in the 3rd and 4th position' ] },
75+
{ file => 'hostname.json', group_description => 'validation of A-label (punycode) host names' },
7576
{ file => 'iri.json', group_description => 'validation of IRIs', # see test suite issue 395
7677
test_description => 'an invalid IRI based on IPv6' },
7778
{ file => 'idn-hostname.json',

t/zzz-acceptance-draft4-format.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ acceptance_tests(
6666
] },
6767
# various edge cases that are difficult to accomodate
6868
{ file => 'hostname.json', group_description => 'validation of host names', test_description => 'trailing dot' },
69+
{ file => 'hostname.json', group_description => 'validation of A-label (punycode) host names' },
6970
{ file => 'uri.json',
7071
test_description => 'validation of URIs',
7172
test_description => 'an invalid URI with comma in scheme' }, # Mojo::URL does not fully validate

t/zzz-acceptance-draft6-format.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ acceptance_tests(
6767
] },
6868
# various edge cases that are difficult to accomodate
6969
{ file => 'hostname.json', group_description => 'validation of host names', test_description => 'trailing dot' },
70+
{ file => 'hostname.json', group_description => 'validation of A-label (punycode) host names' },
7071
{ file => 'uri.json',
7172
test_description => 'validation of URIs',
7273
test_description => 'an invalid URI with comma in scheme' }, # Mojo::URL does not fully validate

t/zzz-acceptance-draft7-format.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ acceptance_tests(
7070
!$ENV{AUTHOR_TESTING} && !eval { require Net::IDN::Encode; 1 } ? 'idn-hostname.json' : (),
7171
] },
7272
# various edge cases that are difficult to accomodate
73-
{ file => 'hostname.json', group_description => 'validation of host names', test_description => 'trailing dot' },
73+
{ file => 'hostname.json', group_description => 'validation of host names', test_description => [ 'trailing dot', 'contains "--" in the 3rd and 4th position' ] },
74+
{ file => 'hostname.json', group_description => 'validation of A-label (punycode) host names' },
7475
{ file => 'iri.json', group_description => 'validation of IRIs', # see test suite issue 395
7576
test_description => 'an invalid IRI based on IPv6' },
7677
{ file => 'idn-hostname.json',

0 commit comments

Comments
 (0)