File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 6161 "valid" : true
6262 }
6363 ]
64+ },
65+ {
66+ "description" : " pattern with literal Unicode characters (draft 2020-12)" ,
67+ "schema" : {
68+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
69+ "pattern" : " ^λ+$"
70+ },
71+ "tests" : [
72+ {
73+ "description" : " matching repeated Greek letter" ,
74+ "data" : " λλλ" ,
75+ "valid" : true
76+ },
77+ {
78+ "description" : " non-matching mixed characters" ,
79+ "data" : " λaλ" ,
80+ "valid" : false
81+ },
82+ {
83+ "description" : " matching single literal" ,
84+ "data" : " λ" ,
85+ "valid" : true
86+ }
87+ ]
88+ },
89+ {
90+ "description" : " pattern with literal emoji character" ,
91+ "schema" : {
92+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
93+ "pattern" : " ^😊$"
94+ },
95+ "tests" : [
96+ {
97+ "description" : " exact emoji match" ,
98+ "data" : " 😊" ,
99+ "valid" : true
100+ },
101+ {
102+ "description" : " emoji plus extra character fails" ,
103+ "data" : " 😊a" ,
104+ "valid" : false
105+ }
106+ ]
64107 }
108+
65109]
Original file line number Diff line number Diff line change 172172 "valid" : true
173173 }
174174 ]
175+ },
176+ {
177+ "description" : " patternProperties with literal Unicode key patterns (draft 2020-12)" ,
178+ "schema" : {
179+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
180+ "patternProperties" : {
181+ "^λ+$" : { "type" : " number" }
182+ }
183+ },
184+ "tests" : [
185+ {
186+ "description" : " matching Unicode property name" ,
187+ "data" : { "λλ" : 1 },
188+ "valid" : true
189+ },
190+ {
191+ "description" : " non-matching property name ignored" ,
192+ "data" : { "aa" : 1 },
193+ "valid" : true
194+ },
195+ {
196+ "description" : " matching property name with invalid type" ,
197+ "data" : { "λλ" : " not number" },
198+ "valid" : false
199+ }
200+ ]
175201 }
202+
176203]
You can’t perform that action at this time.
0 commit comments