Skip to content

Commit 4f1c6d1

Browse files
committed
[Test] Update cursor info test to actually check result
Neither cursor info result was actually being checked here. Update to make sure the function is given back in both cases.
1 parent 3ddab3e commit 4f1c6d1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/SourceKit/CursorInfo/cursor_after_edit.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@
99
// RUN: -req=open -text-input %t/empty.swift %t/func.swift -- %t/func.swift == \
1010
// RUN: -req=edit -offset=0 -length=0 -replace="func foo() {}" -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/func.swift -- %t/func.swift == \
1111
// RUN: -req=cursor -offset=5 %t/func.swift -- %t/func.swift == \
12-
// RUN: -req=edit -offset=0 -length=0 -replace="// some comment\n" -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/func.swift -- %t/func.swift == \
13-
// RUN: -req=cursor -offset=21 %t/func.swift -- %t/func.swift
12+
// RUN: -req=edit -offset=0 -length=0 -replace="/* some comment */ " -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/func.swift -- %t/func.swift == \
13+
// RUN: -req=cursor -offset=24 %t/func.swift -- %t/func.swift | %FileCheck %s
14+
15+
// CHECK: source.lang.swift.decl.function.free
16+
// CHECK: foo()
17+
18+
// CHECK: source.lang.swift.decl.function.free
19+
// CHECK: foo()

0 commit comments

Comments
 (0)