mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
Escape syntax character in regex
Syntax characters need to be escaped when they are part of a regex. https://tc39.es/ecma262/#prod-Atom https://tc39.es/ecma262/#prod-PatternCharacter
This commit is contained in:
parent
c5257e6119
commit
34b0db5fb0
@ -261,7 +261,7 @@ function testBound(fun)
|
||||
testBound(strict);
|
||||
testBound(nonstrict);
|
||||
|
||||
var nativeFunctionRegex = /^function\s*\(\)\s*{\s*\[native code\]\s*}$/
|
||||
var nativeFunctionRegex = /^function\s*\(\)\s*\{\s*\[native code\]\s*\}$/
|
||||
assert.sameValue(nativeFunctionRegex.test((function unbound(){"body"}).bind().toString()), true);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user