Debian Codegraph @

spec/JSON-Schema-Test-Suite/tests/draft2020-12/pattern.json

raw ◀ ▶
1 Debian patch touch this file
•1 [
2 {
3 "description": "pattern validation",
4 "schema": {"pattern": "^a*$"},
5 "tests": [
6 {
7 "description": "a matching pattern is valid",
8 "data": "aaa",
9 "valid": true
10 },
11 {
12 "description": "a non-matching pattern is invalid",
13 "data": "abc",
14 "valid": false
15 },
16 {
17 "description": "ignores booleans",
18 "data": true,
19 "valid": true
20 },
21 {
22 "description": "ignores integers",
23 "data": 123,
24 "valid": true
25 },
26 {
27 "description": "ignores floats",
28 "data": 1.0,
29 "valid": true
30 },
31 {
32 "description": "ignores objects",
33 "data": {},
34 "valid": true
35 },
36 {
37 "description": "ignores arrays",
38 "data": [],
39 "valid": true
40 },
41 {
42 "description": "ignores null",
43 "data": null,
44 "valid": true
45 }
46 ]
47 },
48 {
49 "description": "pattern is not anchored",
50 "schema": {"pattern": "a+"},
51 "tests": [
52 {
53 "description": "matches a substring",
54 "data": "xxaayy",
55 "valid": true
56 }
57 ]
58 }
59 ]