|
5 | 5 | //// * /**/
|
6 | 6 | //// */
|
7 | 7 |
|
| 8 | + |
| 9 | +// jsdoc tags are listed when there is more than one whitespace after "*" |
8 | 10 | /////**
|
9 |
| -//// +/*1*/ |
| 11 | +//// * /*1*/ |
10 | 12 | //// */
|
11 |
| -////function a0(s: string) {} |
12 | 13 | ////
|
13 |
| - |
14 |
| -/////**@/*2*/ */ |
15 |
| -////const some = 0; |
| 14 | +/////** |
| 15 | +//// * link to {/*2*/ |
| 16 | +//// */ |
16 | 17 | ////
|
17 | 18 |
|
18 |
| -verify.completions({ marker: "", includes: { name: "@property", text: "@property", kind: "keyword" } }); |
19 |
| - |
20 |
| - |
21 |
| -// |
22 |
| -// test for src/services/completions.ts#getCompletionData.insideComment.hasDocComment (#37546) |
23 |
| -// |
24 |
| -goTo.marker("2"); |
25 |
| -// line 1: [/**@|c|] |
26 | 19 | // before the fix, jsdoc tag names was listed (but no longer appears
|
27 | 20 | // jsdoc tag names are still listed after the fix.
|
28 | 21 | // however this behavior does not by getCompletionData.insideComment.hasDocComment clause
|
29 |
| -verify.completions({ |
30 |
| - triggerCharacter: "@", |
31 |
| - includes: ["abstract", "access"] |
32 |
| -}); |
33 |
| -// line 1: [/**@|c|] -> [/**|c|] |
| 22 | +/////**@/*3*/ */ |
| 23 | +//// |
| 24 | +/////** |
| 25 | +//// * @type {@/*4*/ |
| 26 | +//// */ |
| 27 | +//// |
| 28 | +/////** |
| 29 | +//// *@/*5*/ |
| 30 | +//// */ |
| 31 | +//// |
| 32 | + |
34 | 33 | // before the fix, jsdoc tags was listed but no longer appears
|
35 |
| -edit.backspace(1); |
36 |
| -verify.completions({ |
37 |
| - exact: [] |
38 |
| -}); |
| 34 | +/////** |
| 35 | +//// +/*6*/ |
| 36 | +//// */ |
| 37 | +//// |
| 38 | +/////** |
| 39 | +//// */*7*/ |
| 40 | +//// */ |
| 41 | +//// |
39 | 42 |
|
40 |
| -goTo.marker("1"); |
41 |
| -// line 2: [ +|c|] |
42 |
| -verify.completions({ |
43 |
| - // marker: "1", |
44 |
| - exact: [] |
45 |
| -}); |
46 |
| -// line 2: [ +|c|] -> [ +@|c|] |
47 |
| -// before the fix, jsdoc tag names was listed but no longer appears |
48 |
| -edit.insert("@"); |
49 |
| -verify.completions({ |
50 |
| - // marker: "1", // marker is invalid |
51 |
| - triggerCharacter: "@", |
52 |
| - exact: [] |
53 |
| -}); |
| 43 | +// jsdoc tag names will be listed |
| 44 | +/////** |
| 45 | +//// * @/*8*/ |
| 46 | +//// */ |
| 47 | +//// |
54 | 48 |
|
55 |
| -// line 2: [ +@|c|] -> [ * ### jsdoc @|c|] |
56 | 49 | // before the fix, jsdoc tag names was listed but no longer appears
|
57 |
| -edit.replaceLine(1, " * ### jsdoc @"); |
58 |
| -verify.completions({ |
59 |
| - triggerCharacter: "@", |
60 |
| - exact: [] |
61 |
| -}); |
| 50 | +/////** |
| 51 | +//// +@/*9*/ |
| 52 | +//// */ |
| 53 | +//// |
| 54 | +/////** |
| 55 | +//// * ### jsdoc @/*10*/ |
| 56 | +//// */ |
| 57 | +//// |
62 | 58 |
|
63 |
| -// line 2: [ +@|c|] -> [ *|c|] |
64 |
| -// before the fix, jsdoc tags was listed but no longer appears |
65 |
| -edit.replaceLine(1, " *"); |
66 |
| -verify.completions({ |
67 |
| - exact: [] |
68 |
| -}); |
| 59 | +verify.completions({ marker: "", includes: { name: "@property", text: "@property", kind: "keyword" } }); |
69 | 60 |
|
70 |
| -// line 2: [ *|c|] -> [ *@|c|] |
71 |
| -// this behavior does not by getCompletionData.insideComment.hasDocComment clause |
72 |
| -edit.insert("@"); |
73 |
| -verify.completions({ |
74 |
| - triggerCharacter: "@", |
75 |
| - includes: ["abstract", "access"] |
76 |
| -}); |
77 |
| -// line 2: [ *@|c|] -> [ * |c|] |
78 |
| -// jsdoc tags are listed when there is more than one whitespace after "*" |
79 |
| -edit.replaceLine(1, " * "); |
80 |
| -verify.completions({ |
81 |
| - includes: ["@abstract", "@access"] |
82 |
| -}); |
83 |
| -// line 2: [ * |c|] -> [ * @|c|] |
84 |
| -// jsdoc tag names will be listed |
85 |
| -edit.insert("@"); |
86 |
| -verify.completions({ |
87 |
| - triggerCharacter: "@", |
88 |
| - includes: ["abstract", "access"] |
| 61 | + |
| 62 | +// |
| 63 | +// test for src/services/completions.ts#getCompletionData.insideComment.hasDocComment (#37546) |
| 64 | +// |
| 65 | +test.markerNames().forEach(marker => { |
| 66 | + if (marker) { |
| 67 | + const n = +marker; |
| 68 | + switch (n) { |
| 69 | + case 1: |
| 70 | + // case 2: |
| 71 | + verify.completions({ marker, includes: ["@abstract", "@access"] }); |
| 72 | + break; |
| 73 | + case 3: |
| 74 | + // case 4: |
| 75 | + case 5: |
| 76 | + verify.completions({ |
| 77 | + marker, |
| 78 | + triggerCharacter: "@", |
| 79 | + includes: ["abstract", "access"] |
| 80 | + }); |
| 81 | + break; |
| 82 | + case 6: case 7: |
| 83 | + verify.completions({ marker, exact: [] }); |
| 84 | + break; |
| 85 | + case 8: |
| 86 | + verify.completions({ |
| 87 | + marker, |
| 88 | + triggerCharacter: "@", |
| 89 | + includes: ["abstract", "access"] |
| 90 | + }); |
| 91 | + break; |
| 92 | + case 9: case 10: |
| 93 | + verify.completions({ |
| 94 | + marker, |
| 95 | + triggerCharacter: "@", |
| 96 | + exact: [] |
| 97 | + }); |
| 98 | + break; |
| 99 | + default: break; |
| 100 | + } |
| 101 | + } |
89 | 102 | });
|
0 commit comments