diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/g-zero-matches.js')
-rw-r--r-- | js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/g-zero-matches.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/g-zero-matches.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/g-zero-matches.js new file mode 100644 index 0000000000..2c60e877f2 --- /dev/null +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/g-zero-matches.js @@ -0,0 +1,23 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: Return value when no matches occur with the `global` flag +es6id: 21.2.5.6 +info: | + [...] + 7. If global is false, then + [...] + 8. Else global is true, + [...] + g. Repeat, + i. Let result be RegExpExec(rx, S). + ii. ReturnIfAbrupt(result). + iii. If result is null, then + 1. If n=0, return null. +features: [Symbol.match] +---*/ + +assert.sameValue(/a/g[Symbol.match]('b'), null); + +reportCompare(0, 0); |