Skip to content

Commit ea429f4

Browse files
author
Max Schaefer
committed
JavaScript: Add test case exposing bug in getNextToken.
1 parent 15643d1 commit ea429f4

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

javascript/ql/test/library-tests/Comments/Comments.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
| comments.js:3:7:3:29 | <!-- HT ... t start | HTML comment start |
44
| comments.js:4:1:4:18 | /** doc comment */ | doc comment |
55
| comments.js:5:1:5:20 | --> HTML comment end | HTML comment end |
6+
| comments.js:7:1:7:9 | /*start*/ | start |
7+
| comments.js:7:24:7:30 | /*end*/ | end |

javascript/ql/test/library-tests/Comments/comments.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
/* block comment */
33
stuff <!-- HTML comment start
44
/** doc comment */
5-
--> HTML comment end
5+
--> HTML comment end
6+
7+
/*start*/function f() {/*end*/}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
| comments.js:1:1:1:15 | // line comment | comments.js:3:1:3:5 | stuff |
22
| comments.js:2:1:2:19 | /* block comment */ | comments.js:3:1:3:5 | stuff |
3-
| comments.js:3:7:3:29 | <!-- HT ... t start | comments.js:5:21:5:20 | |
4-
| comments.js:4:1:4:18 | /** doc comment */ | comments.js:5:21:5:20 | |
3+
| comments.js:3:7:3:29 | <!-- HT ... t start | comments.js:7:10:7:17 | function |
4+
| comments.js:4:1:4:18 | /** doc comment */ | comments.js:7:10:7:17 | function |
5+
| comments.js:5:1:5:20 | --> HTML comment end | comments.js:7:10:7:17 | function |
6+
| comments.js:7:1:7:9 | /*start*/ | comments.js:7:19:7:19 | f |
7+
| comments.js:7:24:7:30 | /*end*/ | comments.js:8:1:8:0 | |

0 commit comments

Comments
 (0)