summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/String/normalize-form-non-atom.js
blob: ee6e12c37ffe9138a1da10d96f566b1bd21539d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var BUGNUMBER = 1145326;
var summary = 'String.prototype.normalize error when normalization form parameter is not an atom';

print(BUGNUMBER + ": " + summary);

function test() {
  assertEq("abc".normalize("NFKC".split("").join("")), "abc");
  assertEq("abc".normalize("NFKCabc".replace("abc", "")), "abc");
  assertEq("abc".normalize("N" + "F" + "K" + "C"), "abc");
}

if ("normalize" in String.prototype) {
  // String.prototype.normalize is not enabled in all builds.
  test();
}

if (typeof reportCompare === "function")
  reportCompare(true, true);