From 474a1e6aa9486adf08b0f7e1c41be94adec10d46 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Sun, 20 Oct 2019 15:59:59 +0800 Subject: [PATCH] Update fixtures. --- tests/test-data-lookbehind.json | 6 ++++ tests/test-data-named-groups-unicode.json | 39 +++++++++++++++++++++-- tests/test-data-unicode-properties.json | 4 +-- tests/test-data-unicode.json | 6 ++++ 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/tests/test-data-lookbehind.json b/tests/test-data-lookbehind.json index c6c5b86..f987102 100644 --- a/tests/test-data-lookbehind.json +++ b/tests/test-data-lookbehind.json @@ -346,5 +346,11 @@ 6 ], "raw": "(?a)": { + "type": "group", + "behavior": "normal", + "body": [{ + "type": "value", + "kind": "symbol", + "codePoint": 97, + "range": [7, 8], + "raw": "a" + }], + "range": [0, 9], + "raw": "(?<$๐’ค>a)", + "name": { + "type": "identifier", + "value": "$๐’ค", + "range": [ + 3, + 6 + ], + "raw": "$๐’ค" + } + }, + "(?<\\u{102A7}ศ >)": { + "type": "group", + "behavior": "normal", + "body": [], + "range": [0, 15], + "raw": "(?<\\u{102A7}ศ >)", + "name": { + "type": "identifier", + "value": "๐Šงศ ", + "range": [3, 13], + "raw": "\\u{102A7}ศ " + } } } diff --git a/tests/test-data-unicode-properties.json b/tests/test-data-unicode-properties.json index 6debb53..cf911ae 100644 --- a/tests/test-data-unicode-properties.json +++ b/tests/test-data-unicode-properties.json @@ -182,13 +182,13 @@ "\\p{}": { "type": "error", "name": "SyntaxError", - "message": "Expected atom at position 2\n \\p{}\n ^", + "message": "atomEscape at position 1\n \\p{}\n ^", "input": "\\p{}" }, "\\P{}": { "type": "error", "name": "SyntaxError", - "message": "Expected atom at position 2\n \\P{}\n ^", + "message": "atomEscape at position 1\n \\P{}\n ^", "input": "\\P{}" } } diff --git a/tests/test-data-unicode.json b/tests/test-data-unicode.json index d8e57b9..b94de3d 100644 --- a/tests/test-data-unicode.json +++ b/tests/test-data-unicode.json @@ -898,5 +898,11 @@ "name": "SyntaxError", "message": "Invalid escape sequence at position 1\n \\u{110000}\n ^", "input": "\\u{110000}" + }, + "\\a": { + "type": "error", + "name": "SyntaxError", + "message": "atomEscape at position 1\n \\a\n ^", + "input": "\\a" } }