summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/parser/regexp-error-location.js
blob: 0d94cf72eeb54ba493011d02918cf8b0d545d9be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Check that error location for RegExp points to the actual line/column inside
// the script instead of inside the pattern.
var line, column;
try {
  eval(`

  /aaa(/;
123456789;
`);
} catch (e) {
  line = e.lineNumber;
  column = e.columnNumber;
}

assertEq(line, 3);
assertEq(column, 7);