Skip to content

Commit f16e875

Browse files
Added tests for escapes in strings, regexes, and templates.
1 parent d1df797 commit f16e875

File tree

348 files changed

+2814
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+2814
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions01_ES5.ts]
2+
3+
var x = /\u{0}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions01_ES5.js]
7+
var x = /\u{0}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts ===
2+
3+
var x = /\u{0}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions01_ES6.ts]
2+
3+
var x = /\u{0}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions01_ES6.js]
7+
var x = /\u{0}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts ===
2+
3+
var x = /\u{0}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions02_ES5.ts]
2+
3+
var x = /\u{00}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions02_ES5.js]
7+
var x = /\u{00}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts ===
2+
3+
var x = /\u{00}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions02_ES6.ts]
2+
3+
var x = /\u{00}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions02_ES6.js]
7+
var x = /\u{00}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts ===
2+
3+
var x = /\u{00}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions03_ES5.ts]
2+
3+
var x = /\u{0000}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions03_ES5.js]
7+
var x = /\u{0000}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts ===
2+
3+
var x = /\u{0000}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions03_ES6.ts]
2+
3+
var x = /\u{0000}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions03_ES6.js]
7+
var x = /\u{0000}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts ===
2+
3+
var x = /\u{0000}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions04_ES5.ts]
2+
3+
var x = /\u{00000000}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions04_ES5.js]
7+
var x = /\u{00000000}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts ===
2+
3+
var x = /\u{00000000}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions04_ES6.ts]
2+
3+
var x = /\u{00000000}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions04_ES6.js]
7+
var x = /\u{00000000}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES6.ts ===
2+
3+
var x = /\u{00000000}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions05_ES5.ts]
2+
3+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions05_ES5.js]
7+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES5.ts ===
2+
3+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
4+
>x : RegExp
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions05_ES6.ts]
2+
3+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
4+
5+
6+
//// [unicodeExtendedEscapesInRegularExpressions05_ES6.js]
7+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES6.ts ===
2+
3+
var x = /\u{48}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{77}\u{6f}\u{72}\u{6c}\u{64}/g;
4+
>x : RegExp
5+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions06_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{10FFFF}/g;
6+
7+
8+
//// [unicodeExtendedEscapesInRegularExpressions06_ES5.js]
9+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
10+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
11+
var x = /\u{10FFFF}/g;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{10FFFF}/g;
6+
>x : RegExp
7+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions06_ES6.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{10FFFF}/g;
6+
7+
8+
//// [unicodeExtendedEscapesInRegularExpressions06_ES6.js]
9+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
10+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
11+
var x = /\u{10FFFF}/g;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES6.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{10FFFF}/g;
6+
>x : RegExp
7+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions07_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{110000}/g;
6+
7+
8+
//// [unicodeExtendedEscapesInRegularExpressions07_ES5.js]
9+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
10+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
11+
var x = /\u{110000}/g;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{110000}/g;
6+
>x : RegExp
7+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions07_ES6.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{110000}/g;
6+
7+
8+
//// [unicodeExtendedEscapesInRegularExpressions07_ES6.js]
9+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
10+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
11+
var x = /\u{110000}/g;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES6.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
5+
var x = /\u{110000}/g;
6+
>x : RegExp
7+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions08_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (FFFF == 65535)
6+
var x = /\u{FFFF}/g;
7+
8+
9+
//// [unicodeExtendedEscapesInRegularExpressions08_ES5.js]
10+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
11+
// 2. If cp ≤ 65535, return cp.
12+
// (FFFF == 65535)
13+
var x = /\u{FFFF}/g;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (FFFF == 65535)
6+
var x = /\u{FFFF}/g;
7+
>x : RegExp
8+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions08_ES6.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (FFFF == 65535)
6+
var x = /\u{FFFF}/g;
7+
8+
9+
//// [unicodeExtendedEscapesInRegularExpressions08_ES6.js]
10+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
11+
// 2. If cp ≤ 65535, return cp.
12+
// (FFFF == 65535)
13+
var x = /\u{FFFF}/g;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES6.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (FFFF == 65535)
6+
var x = /\u{FFFF}/g;
7+
>x : RegExp
8+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions09_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (10000 == 65536)
6+
var x = /\u{10000}/g;
7+
8+
9+
//// [unicodeExtendedEscapesInRegularExpressions09_ES5.js]
10+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
11+
// 2. If cp ≤ 65535, return cp.
12+
// (10000 == 65536)
13+
var x = /\u{10000}/g;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (10000 == 65536)
6+
var x = /\u{10000}/g;
7+
>x : RegExp
8+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions09_ES6.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (10000 == 65536)
6+
var x = /\u{10000}/g;
7+
8+
9+
//// [unicodeExtendedEscapesInRegularExpressions09_ES6.js]
10+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
11+
// 2. If cp ≤ 65535, return cp.
12+
// (10000 == 65536)
13+
var x = /\u{10000}/g;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES6.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. If cp ≤ 65535, return cp.
5+
// (10000 == 65536)
6+
var x = /\u{10000}/g;
7+
>x : RegExp
8+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions10_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
5+
// Although we should just get back a single code point value of 0xD800,
6+
// this is a useful edge-case test.
7+
var x = /\u{D800}/g;
8+
9+
10+
//// [unicodeExtendedEscapesInRegularExpressions10_ES5.js]
11+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
12+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
13+
// Although we should just get back a single code point value of 0xD800,
14+
// this is a useful edge-case test.
15+
var x = /\u{D800}/g;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
5+
// Although we should just get back a single code point value of 0xD800,
6+
// this is a useful edge-case test.
7+
var x = /\u{D800}/g;
8+
>x : RegExp
9+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions10_ES6.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
5+
// Although we should just get back a single code point value of 0xD800,
6+
// this is a useful edge-case test.
7+
var x = /\u{D800}/g;
8+
9+
10+
//// [unicodeExtendedEscapesInRegularExpressions10_ES6.js]
11+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
12+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
13+
// Although we should just get back a single code point value of 0xD800,
14+
// this is a useful edge-case test.
15+
var x = /\u{D800}/g;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES6.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
5+
// Although we should just get back a single code point value of 0xD800,
6+
// this is a useful edge-case test.
7+
var x = /\u{D800}/g;
8+
>x : RegExp
9+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//// [unicodeExtendedEscapesInRegularExpressions11_ES5.ts]
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
5+
// Although we should just get back a single code point value of 0xDC00,
6+
// this is a useful edge-case test.
7+
var x = /\u{DC00}/g;
8+
9+
10+
//// [unicodeExtendedEscapesInRegularExpressions11_ES5.js]
11+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
12+
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
13+
// Although we should just get back a single code point value of 0xDC00,
14+
// this is a useful edge-case test.
15+
var x = /\u{DC00}/g;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions11_ES5.ts ===
2+
3+
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
4+
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
5+
// Although we should just get back a single code point value of 0xDC00,
6+
// this is a useful edge-case test.
7+
var x = /\u{DC00}/g;
8+
>x : RegExp
9+

0 commit comments

Comments
 (0)