summaryrefslogtreecommitdiff
path: root/test/annexB
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-11-01 07:54:08 -0700
committerAndré Bargull <andre.bargull@gmail.com>2017-11-01 08:23:43 -0700
commit2d6a356699eb9067cb38dd742da09d8824363abe (patch)
tree1ca976d1747defd0d01dfeea7579989089c81552 /test/annexB
parentb3fc8482fb7d0b2bd0f0b93969a77aa4a1db982c (diff)
downloadqtdeclarative-testsuites-2d6a356699eb9067cb38dd742da09d8824363abe.tar.gz
Move incomplete_hex_unicode_escape.js to annexB
Fixes #1313
Diffstat (limited to 'test/annexB')
-rw-r--r--test/annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js b/test/annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js
new file mode 100644
index 000000000..966619486
--- /dev/null
+++ b/test/annexB/built-ins/RegExp/incomplete_hex_unicode_escape.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 Zirak. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: An incomplete HexEscape or UnicodeEscape should be treated as an Identity Escape
+info: >
+ An incomplete HexEscape (e.g. /\x/) or UnicodeEscape (/\u/) should fall
+ through to IdentityEscape
+esid: prod-AtomEscape
+---*/
+
+// Hex escape
+assert(/\x/.test("x"), "/\\x/");
+assert(/\xa/.test("xa"), "/\\xa/");
+
+// Unicode escape
+assert(/\u/.test("u"), "/\\u/");
+assert(/\ua/.test("ua"), "/\\ua/");