summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/extensions/bug472534.js
blob: 0c7d5f3ecb208e37aca135de6ed7eac488b29312 (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
26
27
28
29
30
function monthNames () {
    return [
      /jan(uar(y)?)?/, 0,
      /feb(ruar(y)?)?/, 1,
      /m\u00e4r|mar|m\u00e4rz|maerz|march/, 2,
      /apr(il)?/, 3,
      /ma(i|y)/, 4,
      /jun(i|o|e)?/, 5,
      /jul(i|y)?/, 6,
      /aug(ust)?/, 7,
      /sep((t)?(ember))?/, 8,
      /o(c|k)t(ober)?/, 9,
      /nov(ember)?/, 10,
      /de(c|z)(ember)?/, 11
    ];
};

var actual = '';
var expected = '(jan(uar(y)?)?)|(feb(ruar(y)?)?)|(m\\u00e4r|mar|m\\u00e4rz|maerz|march)|(apr(il)?)|(ma(i|y))|(jun(i|o|e)?)|(jul(i|y)?)|(aug(ust)?)|(sep((t)?(ember))?)|(o(c|k)t(ober)?)|(nov(ember)?)|(de(c|z)(ember)?)';
var mn = monthNames();
for (var i = 0; i < mn.length; ++i) {
    if (actual)
        actual += '|';
    actual += '(' + mn[i++].source + ')';
}

assertEq(actual, expected);

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