-
- Downloads
Update RegExp tests (#614)
The RegExpBuiltinExec internal operation was modified in March of 2016 [1]: instead of referencing the `global` and `sticky` properties of the "this" value, the algorithm now infers those values from the object's [[OriginalFlags]] internal slot. This change invalidated a number of tests. In cases where the change resulted in an observable behavior, update the tests to assert the latest specification text. In cases where the change removed a previously-observable behavior, remove the files completely. Specification text change set: > 1. Assert: Type(_S_) is String. > 1. Let _length_ be the number of code units in _S_. > 1. Let _lastIndex_ be ? ToLength(? Get(_R_, `"lastIndex"`)). > - 1. Let _global_ be ToBoolean(? Get(_R_, `"global"`)). > - 1. Let _sticky_ be ToBoolean(? Get(_R_, `"sticky"`)). > + 1. Let _flags_ be the value of _R_'s [[OriginalFlags]] internal slot. > + 1. If _flags_ contains `"g"`, let _global_ be *true*, else let _global_ be *false*. > + 1. If _flags_ contains `"y"`, let _sticky_ be *true*, else let _sticky_ be *false*. > 1. If _global_ is *false* and _sticky_ is *false*, let _lastIndex_ be 0. > 1. Let _matcher_ be the value of _R_'s [[RegExpMatcher]] internal slot. > - 1. Let _flags_ be the value of _R_'s [[OriginalFlags]] internal slot. > 1. If _flags_ contains `"u"`, let _fullUnicode_ be *true*, else let _fullUnicode_ be *false*. > 1. Let _matchSucceeded_ be *false*. > 1. Repeat, while _matchSucceeded_ is *false* [1] https://github.com/tc39/ecma262/pull/494
Showing
- test/built-ins/RegExp/prototype/Symbol.match/builtin-coerce-global.js 0 additions, 97 deletions...ns/RegExp/prototype/Symbol.match/builtin-coerce-global.js
- test/built-ins/RegExp/prototype/Symbol.match/builtin-coerce-sticky.js 0 additions, 79 deletions...ns/RegExp/prototype/Symbol.match/builtin-coerce-sticky.js
- test/built-ins/RegExp/prototype/Symbol.match/builtin-get-global-err.js 0 additions, 41 deletions...s/RegExp/prototype/Symbol.match/builtin-get-global-err.js
- test/built-ins/RegExp/prototype/Symbol.match/builtin-get-sticky-err.js 0 additions, 37 deletions...s/RegExp/prototype/Symbol.match/builtin-get-sticky-err.js
- test/built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex-err.js 14 additions, 5 deletions...otype/Symbol.match/builtin-success-g-set-lastindex-err.js
- test/built-ins/RegExp/prototype/Symbol.match/builtin-success-g-set-lastindex.js 8 additions, 10 deletions...prototype/Symbol.match/builtin-success-g-set-lastindex.js
- test/built-ins/RegExp/prototype/Symbol.match/coerce-global.js 54 additions, 37 deletions.../built-ins/RegExp/prototype/Symbol.match/coerce-global.js
- test/built-ins/RegExp/prototype/Symbol.match/coerce-sticky.js 0 additions, 54 deletions.../built-ins/RegExp/prototype/Symbol.match/coerce-sticky.js
- test/built-ins/RegExp/prototype/Symbol.match/get-sticky-err.js 0 additions, 33 deletions...built-ins/RegExp/prototype/Symbol.match/get-sticky-err.js
- test/built-ins/RegExp/prototype/Symbol.replace/coerce-global.js 37 additions, 11 deletions...uilt-ins/RegExp/prototype/Symbol.replace/coerce-global.js
- test/built-ins/RegExp/prototype/Symbol.replace/get-sticky-coerce.js 0 additions, 53 deletions...-ins/RegExp/prototype/Symbol.replace/get-sticky-coerce.js
- test/built-ins/RegExp/prototype/Symbol.replace/get-sticky-err.js 0 additions, 31 deletions...ilt-ins/RegExp/prototype/Symbol.replace/get-sticky-err.js
- test/built-ins/RegExp/prototype/Symbol.search/get-sticky-coerce.js 0 additions, 54 deletions...t-ins/RegExp/prototype/Symbol.search/get-sticky-coerce.js
- test/built-ins/RegExp/prototype/Symbol.search/get-sticky-err.js 0 additions, 30 deletions...uilt-ins/RegExp/prototype/Symbol.search/get-sticky-err.js
- test/built-ins/RegExp/prototype/exec/get-sticky-coerce.js 0 additions, 52 deletionstest/built-ins/RegExp/prototype/exec/get-sticky-coerce.js
- test/built-ins/RegExp/prototype/exec/get-sticky-err.js 0 additions, 29 deletionstest/built-ins/RegExp/prototype/exec/get-sticky-err.js
- test/built-ins/RegExp/prototype/test/get-sticky-err.js 0 additions, 30 deletionstest/built-ins/RegExp/prototype/test/get-sticky-err.js
Loading
Please register or sign in to comment