1 This test checks highlighter correctness.
4 After highlighting 5 lines
5 1 : /** : javascript-comment[0-5]
6 2 : * line #1 : javascript-comment[0-10]
7 3 : * line #2 : javascript-comment[0-10]
8 4 : * line #3 : javascript-comment[0-10]
9 5 : * line #4 : javascript-comment[0-10]
14 10 : * var a = new A(); //*/ : null
18 After highlighting all lines
19 1 : /** : javascript-comment[0-5]
20 2 : * line #1 : javascript-comment[0-10]
21 3 : * line #2 : javascript-comment[0-10]
22 4 : * line #3 : javascript-comment[0-10]
23 5 : * line #4 : javascript-comment[0-10]
24 6 : * line #5 : javascript-comment[0-10]
25 7 : * line #6 : javascript-comment[0-10]
26 8 : * line #7 : javascript-comment[0-10]
27 9 : * line #8 : javascript-comment[0-10]
28 10 : * var a = new A(); //*/ : javascript-comment[0-24]
29 11 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
32 After changing text model, but before updating highlights
33 1 : /** : javascript-comment[0-5]
34 2 : * line #1 : javascript-comment[0-10]
35 3 : * line #2 : javascript-comment[0-10]
45 13 : * var a = new A(); //*/ : null
47 15 : * line #6 : javascript-comment[0-10]
48 16 : * line #7 : javascript-comment[0-10]
49 17 : * line #8 : javascript-comment[0-10]
50 18 : * var a = new A(); //*/ : javascript-comment[0-24]
51 19 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
54 After updating highlights
55 1 : /** : javascript-comment[0-5]
56 2 : * line #1 : javascript-comment[0-10]
57 3 : * line #2 : javascript-comment[0-10]
58 4 : /** : javascript-comment[0-4]
59 5 : * line #1 : javascript-comment[0-10]
60 6 : * line #2 : javascript-comment[0-10]
61 7 : * line #3 : javascript-comment[0-10]
62 8 : * line #4 : javascript-comment[0-10]
63 9 : * line #5 : javascript-comment[0-10]
64 10 : * line #6 : javascript-comment[0-10]
65 11 : * line #7 : javascript-comment[0-10]
66 12 : * line #8 : javascript-comment[0-10]
67 13 : * var a = new A(); //*/ : javascript-comment[0-24]
68 14 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
69 15 : * line #6 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
72 18 : * var a = new A(); //*/ : null
76 After highlighting up to the end
77 1 : /** : javascript-comment[0-5]
78 2 : * line #1 : javascript-comment[0-10]
79 3 : * line #2 : javascript-comment[0-10]
80 4 : /** : javascript-comment[0-4]
81 5 : * line #1 : javascript-comment[0-10]
82 6 : * line #2 : javascript-comment[0-10]
83 7 : * line #3 : javascript-comment[0-10]
84 8 : * line #4 : javascript-comment[0-10]
85 9 : * line #5 : javascript-comment[0-10]
86 10 : * line #6 : javascript-comment[0-10]
87 11 : * line #7 : javascript-comment[0-10]
88 12 : * line #8 : javascript-comment[0-10]
89 13 : * var a = new A(); //*/ : javascript-comment[0-24]
90 14 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
91 15 : * line #6 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
92 16 : * line #7 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
93 17 : * line #8 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
94 18 : * var a = new A(); //*/ : whitespace[0-1] whitespace[2-3] javascript-keyword[3-6] whitespace[6-7] javascript-ident[7-8] whitespace[8-9] whitespace[10-11] javascript-keyword[11-14] whitespace[14-15] javascript-ident[15-16] brace-start[16-17] brace-end[17-18] whitespace[19-20] javascript-comment[20-24]
95 19 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
98 After changing the first line, and updating the highlights for the first 5 lines
99 1 : foo /* comment */ : javascript-ident[0-3] whitespace[3-4] javascript-comment[4-17]
100 2 : * line #1 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
101 3 : * line #2 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
102 4 : /** : javascript-comment[0-5]
103 5 : * line #1 : javascript-comment[0-10]
104 6 : * line #2 : javascript-comment[0-10]
105 7 : * line #3 : javascript-comment[0-10]
106 8 : * line #4 : javascript-comment[0-10]
107 9 : * line #5 : javascript-comment[0-10]
108 10 : * line #6 : javascript-comment[0-10]
109 11 : * line #7 : javascript-comment[0-10]
110 12 : * line #8 : javascript-comment[0-10]
111 13 : * var a = new A(); //*/ : javascript-comment[0-24]
112 14 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
113 15 : * line #6 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
114 16 : * line #7 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
115 17 : * line #8 : whitespace[0-1] whitespace[2-3] javascript-ident[3-7] whitespace[7-8] javascript-number[9-10]
116 18 : * var a = new A(); //*/ : whitespace[0-1] whitespace[2-3] javascript-keyword[3-6] whitespace[6-7] javascript-ident[7-8] whitespace[8-9] whitespace[10-11] javascript-keyword[11-14] whitespace[14-15] javascript-ident[15-16] brace-start[16-17] brace-end[17-18] whitespace[19-20] javascript-comment[20-24]
117 19 : some text : javascript-ident[0-4] whitespace[4-5] javascript-ident[5-9]
120 Again change the first line, but update only first 2 lines (invalidate update for the lines below)
121 1 : foo /* comment */ /* : javascript-ident[0-3] whitespace[3-4] javascript-comment[4-17] whitespace[17-18] javascript-comment[18-21]
122 2 : * line #1 : javascript-comment[0-10]
130 10 : * line #6 : null
131 11 : * line #7 : null
132 12 : * line #8 : null
133 13 : * var a = new A(); //*/ : null
134 14 : some text : null
135 15 : * line #6 : null
136 16 : * line #7 : null
137 17 : * line #8 : null
138 18 : * var a = new A(); //*/ : null
139 19 : some text : null