diff options
Diffstat (limited to 'json/tests/draft2019-09/optional/ecmascript-regex.json')
-rw-r--r-- | json/tests/draft2019-09/optional/ecmascript-regex.json | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/json/tests/draft2019-09/optional/ecmascript-regex.json b/json/tests/draft2019-09/optional/ecmascript-regex.json index 81643f8..7a0cb77 100644 --- a/json/tests/draft2019-09/optional/ecmascript-regex.json +++ b/json/tests/draft2019-09/optional/ecmascript-regex.json @@ -11,6 +11,25 @@ ] }, { + "description": "ECMA 262 regex $ does not match trailing newline", + "schema": { + "type": "string", + "pattern": "^abc$" + }, + "tests": [ + { + "description": "matches in Python, but should not in jsonschema", + "data": "abc\n", + "valid": false + }, + { + "description": "should match", + "data": "abc", + "valid": true + } + ] + }, + { "description": "ECMA 262 regex converts \\a to ascii BEL", "schema": { "type": "string", |