@@ -1199,7 +1199,7 @@ final class BackgroundIndexingTests: XCTestCase {
11991199 )
12001200 let packageResolvedURL = project. scratchDirectory. appendingPathComponent ( " Package.resolved " )
12011201
1202- let originalPackageResolvedContents = try String ( contentsOf: packageResolvedURL)
1202+ let originalPackageResolvedContents = try String ( contentsOf: packageResolvedURL, encoding : . utf8 )
12031203
12041204 // First check our setup to see that we get the expected hover response before changing the dependency project.
12051205 let ( uri, positions) = try project. openDocument ( " Test.swift " )
@@ -1234,7 +1234,7 @@ final class BackgroundIndexingTests: XCTestCase {
12341234 ] )
12351235 )
12361236 try await project. testClient. send ( PollIndexRequest ( ) )
1237- XCTAssertEqual ( try String ( contentsOf: packageResolvedURL) , originalPackageResolvedContents)
1237+ XCTAssertEqual ( try String ( contentsOf: packageResolvedURL, encoding : . utf8 ) , originalPackageResolvedContents)
12381238
12391239 // Simulate a package update which goes as follows:
12401240 // - The user runs `swift package update`
@@ -1248,7 +1248,7 @@ final class BackgroundIndexingTests: XCTestCase {
12481248 ] ,
12491249 workingDirectory: nil
12501250 )
1251- XCTAssertNotEqual ( try String ( contentsOf: packageResolvedURL) , originalPackageResolvedContents)
1251+ XCTAssertNotEqual ( try String ( contentsOf: packageResolvedURL, encoding : . utf8 ) , originalPackageResolvedContents)
12521252 project. testClient. send (
12531253 DidChangeWatchedFilesNotification ( changes: [
12541254 FileEvent ( uri: DocumentURI ( project. scratchDirectory. appendingPathComponent ( " Package.resolved " ) ) , type: . changed)
0 commit comments