• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2    {
3        "description": "Proper UTF-16 surrogate pair handling: pattern",
4        "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters",
5        "schema": { "pattern": "^��*$" },
6        "tests": [
7            {
8                "description": "matches empty",
9                "data": "",
10                "valid": true
11            },
12            {
13                "description": "matches single",
14                "data": "��",
15                "valid": true
16            },
17            {
18                "description": "matches two",
19                "data": "����",
20                "valid": true
21            },
22            {
23                "description": "doesn't match one",
24                "data": "��",
25                "valid": false
26            },
27            {
28                "description": "doesn't match two",
29                "data": "����",
30                "valid": false
31            },
32            {
33                "description": "doesn't match one ASCII",
34                "data": "D",
35                "valid": false
36            },
37            {
38                "description": "doesn't match two ASCII",
39                "data": "DD",
40                "valid": false
41            }
42        ]
43    },
44    {
45        "description": "Proper UTF-16 surrogate pair handling: patternProperties",
46        "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters",
47        "schema": {
48            "patternProperties": {
49                "^��*$": {
50                    "type": "integer"
51                }
52            }
53        },
54        "tests": [
55            {
56                "description": "matches empty",
57                "data": { "": 1 },
58                "valid": true
59            },
60            {
61                "description": "matches single",
62                "data": { "��": 1 },
63                "valid": true
64            },
65            {
66                "description": "matches two",
67                "data": { "����": 1 },
68                "valid": true
69            },
70            {
71                "description": "doesn't match one",
72                "data": { "��": "hello" },
73                "valid": false
74            },
75            {
76                "description": "doesn't match two",
77                "data": { "����": "hello" },
78                "valid": false
79            }
80        ]
81    }
82]
83