Skip to content

Commit 6009ec4

Browse files
authored
Merge pull request bellard#14 from openwebf/feat/column
fix: add dynamic function case for test_line_column
2 parents 3873dec + 3ad8e9e commit 6009ec4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/test_line_column_num.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,16 @@ var a = \`1+1
213213
}
214214
}
215215

216+
/** dynamic Function parse error should be located the latest token */
217+
function test_line_column13() {
218+
try {
219+
eval(`Function("===>", "a");`);
220+
} catch (e) {
221+
assert(e.lineNumber, 1, 'test_line_column13');
222+
assert(e.columnNumber, 20, 'test_line_column13');
223+
}
224+
}
225+
216226
test_line_column1();
217227
test_line_column2();
218228
test_line_column3();
@@ -224,4 +234,5 @@ test_line_column8();
224234
test_line_column9();
225235
test_line_column10();
226236
test_line_column11();
227-
test_line_column12();
237+
test_line_column12();
238+
test_line_column13();

0 commit comments

Comments
 (0)