Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.2.10_A1.4_T1.js
blob27d31424ecab73e9ead98d71d3eef8cdfdf46727
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: |
6     The production CharacterEscape :: f evaluates by returning
7     the character \u000C
8 es5id: 15.10.2.10_A1.4_T1
9 description: Use \f in RegExp and \u000C in tested string
10 ---*/
12 var arr = /\f/.exec("\u000C");
13 if ((arr === null) || (arr[0] !== "\u000C")) {
14   throw new Test262Error('#1: var arr = /\\f/.exec("\\u000C"); arr[0] === "\\u000C". Actual. ' + (arr && arr[0]));
17 var arr = /\f\f/.exec("a\u000C\u000Cb");
18 if ((arr === null) || (arr[0] !== "\u000C\u000C")) {
19   throw new Test262Error('#2: var arr = /\\f\\f/.exec("a\\u000C\\u000Cb"); arr[0] === "\\u000C\\u000C". Actual. ' + (arr && arr[0]));
22 reportCompare(0, 0);