@@ -4,7 +4,7 @@ import XCTest
44@testable import GitHubCopilotService
55
66final class FetchSuggestionTests : XCTestCase {
7- func test_process_sugestions_from_server ( ) async throws {
7+ func test_process_suggestions_from_server ( ) async throws {
88 struct TestServer : GitHubCopilotLSP {
99 func sendNotification( _ notif: LanguageServerProtocol . ClientNotification ) async throws {
1010 fatalError ( )
@@ -44,7 +44,8 @@ final class FetchSuggestionTests: XCTestCase {
4444 tabSize: 4 ,
4545 indentSize: 4 ,
4646 usesTabsForIndentation: false ,
47- ignoreSpaceOnlySuggestions: false
47+ ignoreSpaceOnlySuggestions: false ,
48+ ignoreTrailingNewLinesAndSpaces: false
4849 )
4950 XCTAssertEqual ( completions. count, 3 )
5051 }
@@ -89,7 +90,8 @@ final class FetchSuggestionTests: XCTestCase {
8990 tabSize: 4 ,
9091 indentSize: 4 ,
9192 usesTabsForIndentation: false ,
92- ignoreSpaceOnlySuggestions: true
93+ ignoreSpaceOnlySuggestions: true ,
94+ ignoreTrailingNewLinesAndSpaces: false
9395 )
9496 XCTAssertEqual ( completions. count, 1 )
9597 XCTAssertEqual ( completions. first? . text, " Hello World \n " )
@@ -128,9 +130,10 @@ final class FetchSuggestionTests: XCTestCase {
128130 tabSize: 4 ,
129131 indentSize: 4 ,
130132 usesTabsForIndentation: false ,
131- ignoreSpaceOnlySuggestions: false
133+ ignoreSpaceOnlySuggestions: false ,
134+ ignoreTrailingNewLinesAndSpaces: true
132135 )
133136 XCTAssertEqual ( completions. count, 1 )
134- XCTAssertEqual ( completions. first? . text, " Hello World \n " )
137+ XCTAssertEqual ( completions. first? . text, " Hello World " )
135138 }
136139}
0 commit comments