summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js')
-rw-r--r--js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js b/js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js
new file mode 100644
index 0000000000..4b6c50fb00
--- /dev/null
+++ b/js/src/tests/test262/annexB/built-ins/RegExp/RegExp-leading-escape.js
@@ -0,0 +1,16 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ RegularExpressionFirstChar :: BackslashSequence :: \NonTerminator,
+ RegularExpressionChars :: [empty], RegularExpressionFlags :: [empty]
+es5id: 7.8.5_A1.4_T1
+es6id: 11.8.5
+description: Check similar to (/\1/.source === "\\1")
+---*/
+
+assert.sameValue(/\1/.source, "\\1");
+assert.sameValue(/\a/.source, "\\a");
+
+reportCompare(0, 0);