mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Update the cursor requests to also pass in their primary file. Snapshots should be compared using this file, not the input buffer name. This fixes AST re-use when the AST is usable with snapshots. Resolves rdar://110344363.
12 lines
591 B
Swift
12 lines
591 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: touch %t/empty.swift
|
|
// RUN: echo "func foo() {}" >> %t/func.swift
|
|
|
|
// Edit previously did not update the syntax info. Cursor info was using its
|
|
// buffer to calculate line and column (before rdar://78161348).
|
|
// RUN: %sourcekitd-test \
|
|
// RUN: -req=open -text-input %t/empty.swift %t/func.swift -- %t/func.swift == \
|
|
// RUN: -req=edit -offset=0 -length=0 -replace="func foo() {}" -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 %t/func.swift -- %t/func.swift == \
|
|
// RUN: -req=cursor -offset=5 %t/func.swift -- %t/func.swift
|