cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2019-09/optional/non-bmp-regex.json (about)

     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": {
     6  			"$schema": "https://json-schema.org/draft/2019-09/schema",
     7  			"pattern": "^🐲*$"
     8  		},
     9  		"tests": [
    10  			{
    11  				"description": "matches empty",
    12  				"data": "",
    13  				"valid": true
    14  			},
    15  			{
    16  				"description": "matches single",
    17  				"data": "🐲",
    18  				"valid": true
    19  			},
    20  			{
    21  				"description": "matches two",
    22  				"data": "🐲🐲",
    23  				"valid": true
    24  			},
    25  			{
    26  				"description": "doesn't match one",
    27  				"data": "🐉",
    28  				"valid": false
    29  			},
    30  			{
    31  				"description": "doesn't match two",
    32  				"data": "🐉🐉",
    33  				"valid": false
    34  			},
    35  			{
    36  				"description": "doesn't match one ASCII",
    37  				"data": "D",
    38  				"valid": false
    39  			},
    40  			{
    41  				"description": "doesn't match two ASCII",
    42  				"data": "DD",
    43  				"valid": false
    44  			}
    45  		]
    46  	},
    47  	{
    48  		"description": "Proper UTF-16 surrogate pair handling: patternProperties",
    49  		"comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters",
    50  		"schema": {
    51  			"$schema": "https://json-schema.org/draft/2019-09/schema",
    52  			"patternProperties": {
    53  				"^🐲*$": {
    54  					"type": "integer"
    55  				}
    56  			}
    57  		},
    58  		"tests": [
    59  			{
    60  				"description": "matches empty",
    61  				"data": {
    62  					"": 1
    63  				},
    64  				"valid": true
    65  			},
    66  			{
    67  				"description": "matches single",
    68  				"data": {
    69  					"🐲": 1
    70  				},
    71  				"valid": true
    72  			},
    73  			{
    74  				"description": "matches two",
    75  				"data": {
    76  					"🐲🐲": 1
    77  				},
    78  				"valid": true
    79  			},
    80  			{
    81  				"description": "doesn't match one",
    82  				"data": {
    83  					"🐲": "hello"
    84  				},
    85  				"valid": false
    86  			},
    87  			{
    88  				"description": "doesn't match two",
    89  				"data": {
    90  					"🐲🐲": "hello"
    91  				},
    92  				"valid": false
    93  			}
    94  		]
    95  	}
    96  ]