Skip to content

Commit

Permalink
Added tests for escapes in strings, regexes, and templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Feb 25, 2015
1 parent d1df797 commit f16e875
Show file tree
Hide file tree
Showing 348 changed files with 2,814 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions01_ES5.ts]

var x = /\u{0}/g;

This comment has been minimized.

Copy link
@yuit

yuit Feb 28, 2015

Contributor

Should we warn the users that we don't support the feature



//// [unicodeExtendedEscapesInRegularExpressions01_ES5.js]
var x = /\u{0}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts ===

var x = /\u{0}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions01_ES6.ts]

var x = /\u{0}/g;


//// [unicodeExtendedEscapesInRegularExpressions01_ES6.js]
var x = /\u{0}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts ===

var x = /\u{0}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions02_ES5.ts]

var x = /\u{00}/g;


//// [unicodeExtendedEscapesInRegularExpressions02_ES5.js]
var x = /\u{00}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts ===

var x = /\u{00}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions02_ES6.ts]

var x = /\u{00}/g;


//// [unicodeExtendedEscapesInRegularExpressions02_ES6.js]
var x = /\u{00}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts ===

var x = /\u{00}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions03_ES5.ts]

var x = /\u{0000}/g;


//// [unicodeExtendedEscapesInRegularExpressions03_ES5.js]
var x = /\u{0000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts ===

var x = /\u{0000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions03_ES6.ts]

var x = /\u{0000}/g;


//// [unicodeExtendedEscapesInRegularExpressions03_ES6.js]
var x = /\u{0000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts ===

var x = /\u{0000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions04_ES5.ts]

var x = /\u{00000000}/g;


//// [unicodeExtendedEscapesInRegularExpressions04_ES5.js]
var x = /\u{00000000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts ===

var x = /\u{00000000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions04_ES6.ts]

var x = /\u{00000000}/g;


//// [unicodeExtendedEscapesInRegularExpressions04_ES6.js]
var x = /\u{00000000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES6.ts ===

var x = /\u{00000000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions05_ES5.ts]

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;


//// [unicodeExtendedEscapesInRegularExpressions05_ES5.js]
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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES5.ts ===

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;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [unicodeExtendedEscapesInRegularExpressions05_ES6.ts]

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;


//// [unicodeExtendedEscapesInRegularExpressions05_ES6.js]
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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions05_ES6.ts ===

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;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//// [unicodeExtendedEscapesInRegularExpressions06_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;


//// [unicodeExtendedEscapesInRegularExpressions06_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//// [unicodeExtendedEscapesInRegularExpressions06_ES6.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;


//// [unicodeExtendedEscapesInRegularExpressions06_ES6.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions06_ES6.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{10FFFF}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//// [unicodeExtendedEscapesInRegularExpressions07_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;


//// [unicodeExtendedEscapesInRegularExpressions07_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//// [unicodeExtendedEscapesInRegularExpressions07_ES6.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;


//// [unicodeExtendedEscapesInRegularExpressions07_ES6.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions07_ES6.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 1. Assert: 0 ≤ cp ≤ 0x10FFFF.
var x = /\u{110000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//// [unicodeExtendedEscapesInRegularExpressions08_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;


//// [unicodeExtendedEscapesInRegularExpressions08_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//// [unicodeExtendedEscapesInRegularExpressions08_ES6.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;


//// [unicodeExtendedEscapesInRegularExpressions08_ES6.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions08_ES6.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (FFFF == 65535)
var x = /\u{FFFF}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//// [unicodeExtendedEscapesInRegularExpressions09_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;


//// [unicodeExtendedEscapesInRegularExpressions09_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//// [unicodeExtendedEscapesInRegularExpressions09_ES6.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;


//// [unicodeExtendedEscapesInRegularExpressions09_ES6.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions09_ES6.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. If cp ≤ 65535, return cp.
// (10000 == 65536)
var x = /\u{10000}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//// [unicodeExtendedEscapesInRegularExpressions10_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;


//// [unicodeExtendedEscapesInRegularExpressions10_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//// [unicodeExtendedEscapesInRegularExpressions10_ES6.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;


//// [unicodeExtendedEscapesInRegularExpressions10_ES6.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions10_ES6.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu1 be floor((cp – 65536) / 1024) + 0xD800.
// Although we should just get back a single code point value of 0xD800,
// this is a useful edge-case test.
var x = /\u{D800}/g;
>x : RegExp

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//// [unicodeExtendedEscapesInRegularExpressions11_ES5.ts]

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
// Although we should just get back a single code point value of 0xDC00,
// this is a useful edge-case test.
var x = /\u{DC00}/g;


//// [unicodeExtendedEscapesInRegularExpressions11_ES5.js]
// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
// Although we should just get back a single code point value of 0xDC00,
// this is a useful edge-case test.
var x = /\u{DC00}/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
=== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions11_ES5.ts ===

// ES6 Spec - 10.1.1 Static Semantics: UTF16Encoding (cp)
// 2. Let cu2 be ((cp – 65536) modulo 1024) + 0xDC00.
// Although we should just get back a single code point value of 0xDC00,
// this is a useful edge-case test.
var x = /\u{DC00}/g;
>x : RegExp

Loading

0 comments on commit f16e875

Please sign in to comment.