|
1 | 1 | // RUN: %empty-directory(%t) |
2 | | -// RUN: echo "" > %t/t.swift |
| 2 | +// RUN: echo "func f() { f() }" > %t/t.swift |
3 | 3 |
|
4 | 4 | // RUN: %sourcekitd-test \ |
5 | | -// RUN: -req=open %t/t.swift -- %t/t.swift == \ |
6 | | -// RUN: -req=edit -offset=0 -replace="func foo() { warn("") }" -length=0 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift -print-raw-response == \ |
| 5 | +// RUN: -req=open -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift -print-raw-response -- %t/t.swift == \ |
| 6 | +// RUN: -req=edit -offset=0 -replace="func foo() { warn("") }" -length=16 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift -print-raw-response == \ |
7 | 7 | // RUN: -req=edit -offset=13 -replace="print" -length=5 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift -print-raw-response \ |
8 | 8 | // RUN: | %FileCheck --check-prefix=EDIT_NOWAIT %s |
9 | 9 |
|
10 | 10 | // EDIT_NOWAIT: { |
11 | 11 | // EDIT_NOWAIT-NEXT: } |
12 | 12 | // EDIT_NOWAIT-NEXT: { |
13 | 13 | // EDIT_NOWAIT-NEXT: } |
| 14 | +// EDIT_NOWAIT-NEXT: { |
| 15 | +// EDIT_NOWAIT-NEXT: } |
14 | 16 |
|
15 | 17 | // RUN: %sourcekitd-test \ |
16 | | -// RUN: %sourcekitd-test \ |
17 | | -// RUN: -req=open %t/t.swift -- %t/t.swift == \ |
18 | | -// RUN: -req=edit -offset=0 -replace="func foo() { warn("") }" -length=0 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift == \ |
| 18 | +// RUN: -req=open -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift -- %t/t.swift == \ |
| 19 | +// RUN: -req=print-annotations %t/t.swift == \ |
| 20 | +// RUN: -req=edit -offset=0 -replace="func foo() { warn("") }" -length=16 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift == \ |
19 | 21 | // RUN: -req=edit -offset=13 -replace="print" -length=4 -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/t.swift == \ |
20 | | -// RUN: -req=print-annotations %s \ |
| 22 | +// RUN: -req=print-annotations %t/t.swift \ |
21 | 23 | // RUN: | %FileCheck --check-prefix=ANNOTATION %s |
22 | 24 |
|
23 | | -// ANNOTATION: [ |
| 25 | +// ANNOTATION-LABEL: [ |
| 26 | +// ANNOTATION-NEXT: { |
| 27 | +// ANNOTATION-NEXT: key.kind: source.lang.swift.ref.function.free, |
| 28 | +// ANNOTATION-NEXT: key.offset: 11, |
| 29 | +// ANNOTATION-NEXT: key.length: 1 |
| 30 | +// ANNOTATION-NEXT: } |
| 31 | +// ANNOTATION-NEXT: ] |
| 32 | + |
| 33 | +// ANNOTATION-LABEL: [ |
24 | 34 | // ANNOTATION-NEXT: { |
25 | 35 | // ANNOTATION-NEXT: key.kind: source.lang.swift.ref.function.free, |
26 | 36 | // ANNOTATION-NEXT: key.offset: 13, |
|
0 commit comments