summaryrefslogtreecommitdiffstats
path: root/js/src/tests
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2017-08-17 20:37:46 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-12 09:52:39 +0100
commit93f8e06bb8d8656e868679d584c7c8771ff8e42f (patch)
tree63d3edb15082c664a91e2cc311e678d8fbe76fd2 /js/src/tests
parent1df7811e8e7943bf94ca7164c7c173a5c622db7b (diff)
downloadUXP-93f8e06bb8d8656e868679d584c7c8771ff8e42f.tar
UXP-93f8e06bb8d8656e868679d584c7c8771ff8e42f.tar.gz
UXP-93f8e06bb8d8656e868679d584c7c8771ff8e42f.tar.lz
UXP-93f8e06bb8d8656e868679d584c7c8771ff8e42f.tar.xz
UXP-93f8e06bb8d8656e868679d584c7c8771ff8e42f.zip
JS - RegExp - match updated spec for `/\b/iu` and `/\B/iu`
Diffstat (limited to 'js/src/tests')
-rw-r--r--js/src/tests/ecma_6/RegExp/unicode-ignoreCase-word-boundary.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/RegExp/unicode-ignoreCase-word-boundary.js b/js/src/tests/ecma_6/RegExp/unicode-ignoreCase-word-boundary.js
new file mode 100644
index 000000000..c1a04bd3d
--- /dev/null
+++ b/js/src/tests/ecma_6/RegExp/unicode-ignoreCase-word-boundary.js
@@ -0,0 +1,25 @@
+var BUGNUMBER = 1338373;
+var summary = "Word boundary should match U+017F and U+212A in unicode+ignoreCase.";
+
+assertEq(/\b/iu.test('\u017F'), true);
+assertEq(/\b/i.test('\u017F'), false);
+assertEq(/\b/u.test('\u017F'), false);
+assertEq(/\b/.test('\u017F'), false);
+
+assertEq(/\b/iu.test('\u212A'), true);
+assertEq(/\b/i.test('\u212A'), false);
+assertEq(/\b/u.test('\u212A'), false);
+assertEq(/\b/.test('\u212A'), false);
+
+assertEq(/\B/iu.test('\u017F'), false);
+assertEq(/\B/i.test('\u017F'), true);
+assertEq(/\B/u.test('\u017F'), true);
+assertEq(/\B/.test('\u017F'), true);
+
+assertEq(/\B/iu.test('\u212A'), false);
+assertEq(/\B/i.test('\u212A'), true);
+assertEq(/\B/u.test('\u212A'), true);
+assertEq(/\B/.test('\u212A'), true);
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);