From 95f5545d78a12f47d5b3ee10be38a6943cc03be3 Mon Sep 17 00:00:00 2001 From: "Sven A. Schmidt" Date: Fri, 6 Dec 2024 10:02:44 +0100 Subject: [PATCH] Fix remaining contentsOfFile: warnings --- Tests/AppTests/WebpageSnapshotTests.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/AppTests/WebpageSnapshotTests.swift b/Tests/AppTests/WebpageSnapshotTests.swift index 6290fb7b8..372fde567 100644 --- a/Tests/AppTests/WebpageSnapshotTests.swift +++ b/Tests/AppTests/WebpageSnapshotTests.swift @@ -474,7 +474,7 @@ class WebpageSnapshotTests: SnapshotTestCase { func test_DocCTemplate() throws { let doccTemplatePath = fixturesDirectory().appendingPathComponent("docc-template.html").path - let doccHtml = try String(contentsOfFile: doccTemplatePath) + let doccHtml = try String(contentsOfFile: doccTemplatePath, encoding: .utf8) let archive = DocArchive(name: "archive1", title: "Archive1") let processor = try XCTUnwrap(DocumentationPageProcessor(repositoryOwner: "owner", repositoryOwnerName: "Owner Name", @@ -501,7 +501,7 @@ class WebpageSnapshotTests: SnapshotTestCase { func test_DocCTemplate_outdatedStableVersion() throws { let doccTemplatePath = fixturesDirectory().appendingPathComponent("docc-template.html").path - let doccHtml = try String(contentsOfFile: doccTemplatePath) + let doccHtml = try String(contentsOfFile: doccTemplatePath, encoding: .utf8) let archive = DocArchive(name: "archive1", title: "Archive1") let processor = try XCTUnwrap(DocumentationPageProcessor(repositoryOwner: "owner", repositoryOwnerName: "Owner Name", @@ -532,7 +532,7 @@ class WebpageSnapshotTests: SnapshotTestCase { func test_DocCTemplate_multipleVersions() throws { let doccTemplatePath = fixturesDirectory().appendingPathComponent("docc-template.html").path - let doccHtml = try String(contentsOfFile: doccTemplatePath) + let doccHtml = try String(contentsOfFile: doccTemplatePath, encoding: .utf8) let archive1 = DocArchive(name: "archive1", title: "Archive1") let archive2 = DocArchive(name: "archive2", title: "Archive2") let processor = try XCTUnwrap(DocumentationPageProcessor(repositoryOwner: "owner",