Files
swift-mirror/test/SourceKit/CodeComplete/complete_without_stdlib.swift
Alex Hoppen b6e03e3d98 [CodeCompletion] Make sure callback is always called from performOperation
We had some situations left that neither returned an error, nor called the callback with results in `performOperation`. Return an error in these and adjust the tests to correctly match the error.
2021-10-28 11:10:30 +02:00

20 lines
716 B
Swift

class Str {
var value: Str
}
// rdar://problem/58663066
// Test a environment where stdlib is not found.
// Completion should return zero result.
// RUN: %empty-directory(%t/rsrc)
// RUN: %empty-directory(%t/sdk)
// RUN: not %sourcekitd-test \
// RUN: -req=global-config -req-opts=completion_max_astcontext_reuse_count=0 \
// RUN: -req=complete -pos=4:1 %s -- %s -resource-dir %t/rsrc -sdk %t/sdk 2>&1 | %FileCheck %s
// RUN: not %sourcekitd-test \
// RUN: -req=complete -pos=4:1 %s -- %s -resource-dir %t/rsrc -sdk %t/sdk == \
// RUN: -req=complete -pos=4:1 %s -- %s -resource-dir %t/rsrc -sdk %t/sdk 2>&1 | %FileCheck %s
// CHECK: error response (Request Failed): failed to load the standard library