Skip to content

Commit

Permalink
Squashed 'json/' changes from ab0b1ae71..20c1bb1d9
Browse files Browse the repository at this point in the history
20c1bb1d9 test for non-ascii digits in various formats

git-subtree-dir: json
git-subtree-split: 20c1bb1d9ec0d6f995fc06d6ea270d7155ac9d43
  • Loading branch information
Julian committed Aug 24, 2021
1 parent 6cf6ff8 commit b5e545b
Show file tree
Hide file tree
Showing 29 changed files with 225 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/draft-future/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft-future/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1963-06-1৪",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft-future/optional/format/duration.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "P২Y",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft-future/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft-future/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1:2:3:4:5:6:7:৪",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the ipv4 portion also",
"data": "1:2::192.16৪.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft-future/optional/format/time.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
},
{
"description": "no time offset",
"data": "12:00:00",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1২:00:00Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2019-09/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2019-09/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1963-06-1৪",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2019-09/optional/format/duration.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "P২Y",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2019-09/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2019-09/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1:2:3:4:5:6:7:৪",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the ipv4 portion also",
"data": "1:2::192.16৪.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2019-09/optional/format/time.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
},
{
"description": "no time offset",
"data": "12:00:00",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1২:00:00Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2020-12/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2020-12/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1963-06-1৪",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2020-12/optional/format/duration.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "P২Y",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft2020-12/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2020-12/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1:2:3:4:5:6:7:৪",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the ipv4 portion also",
"data": "1:2::192.16৪.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2020-12/optional/format/time.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
},
{
"description": "no time offset",
"data": "12:00:00",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1২:00:00Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft4/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft4/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft4/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1:2:3:4:5:6:7:৪",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the ipv4 portion also",
"data": "1:2::192.16৪.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft6/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 62,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft6/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft6/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
},
{
"description": "non-ascii digits should be rejected",
"data": "1:2:3:4:5:6:7:৪",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the ipv4 portion also",
"data": "1:2::192.16৪.0.1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft7/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the date portion",
"data": "1963-06-1৪T00:00:00Z",
"valid": false
},
{
"description": "non-ascii digits should be rejected in the time portion",
"data": "1963-06-11T0৪:00:00Z",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft7/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1963-06-1৪",
"valid": false
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions tests/draft7/optional/format/ipv4.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
},
{
"description": "non-ascii digits should be rejected",
"data": "1২7.0.0.1",
"valid": false
}
]
}
Expand Down
Loading

0 comments on commit b5e545b

Please sign in to comment.