From bce0db2c3088242c16668d405a8c3f27ce0ed112 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Wed, 12 Feb 2025 11:19:24 -0800 Subject: [PATCH] [regexp-escape] Implement and stage RegExp.escape Bug: 353856236 Change-Id: I24deb20ea4fe1a9b49c13ed0f7e038dea9892354 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6254804 Reviewed-by: Rezvan Mahdavi Hezaveh Commit-Queue: Shu-yu Guo Cr-Commit-Position: refs/heads/main@{#98671} --- test/staging/built-ins/RegExp/escape/surrogate-pair.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/staging/built-ins/RegExp/escape/surrogate-pair.js diff --git a/test/staging/built-ins/RegExp/escape/surrogate-pair.js b/test/staging/built-ins/RegExp/escape/surrogate-pair.js new file mode 100644 index 00000000000..af35e3a2b93 --- /dev/null +++ b/test/staging/built-ins/RegExp/escape/surrogate-pair.js @@ -0,0 +1,9 @@ +// Copyright (C) 2025 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Unescaped surrogate pairs +features: [RegExp.escape] +---*/ + +assert.sameValue(RegExp.escape("\ud800\udc00"), "\ud800\udc00", 'Unescaped surrogate pair');