summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/RegExp/unicode-class-empty.js
blob: 4d187551f634fa281b418fc13524c3f5644cf155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var BUGNUMBER = 1135377;
var summary = "Implement RegExp unicode flag -- empty class should not match anything.";

print(BUGNUMBER + ": " + summary);

assertEq(/[]/u.exec("A"),
         null);
assertEq(/[]/u.exec("\uD83D"),
         null);
assertEq(/[]/u.exec("\uDC38"),
         null);
assertEq(/[]/u.exec("\uD83D\uDC38"),
         null);

assertEqArray(/[^]/u.exec("A"),
              ["A"]);
assertEqArray(/[^]/u.exec("\uD83D"),
              ["\uD83D"]);
assertEqArray(/[^]/u.exec("\uDC38"),
              ["\uDC38"]);
assertEqArray(/[^]/u.exec("\uD83D\uDC38"),
              ["\uD83D\uDC38"]);

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