summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/bug847682.js
blob: 18c6cb49b190f9b105f104490beaac7801894968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function computeInputVariants(len) {
  var orig = "";
  var pointed = "";
  for (var i = 0; i < len; i++) {
    orig += (i%10)+"";
    pointed += (i%10)+".";
  }
  return [orig, pointed];
}

function test() {
  var re11 = /\./g;
  for (var i=0; i < 40; i++) {
    var a = computeInputVariants(i);
    assertEq(a[0], a[1].replace(re11, ''))
  }
}
test();