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