From 8ff49b0831fd23228218873d1c4bc6beeb279e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 20 Nov 2024 16:11:27 +0100 Subject: [PATCH] Fix running BoolFileMarkerTest on device --- Core/BoolFileMarkerTests.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/BoolFileMarkerTests.swift b/Core/BoolFileMarkerTests.swift index 23893a5668..5ad4aa0910 100644 --- a/Core/BoolFileMarkerTests.swift +++ b/Core/BoolFileMarkerTests.swift @@ -41,7 +41,11 @@ final class BoolFileMarkerTests: XCTestCase { let fileURL = try XCTUnwrap(testFileURL) let attributes = try FileManager.default.attributesOfItem(atPath: fileURL.path) +#if targetEnvironment(simulator) XCTAssertNil(attributes[.protectionKey]) +#else + XCTAssertEqual(attributes[.protectionKey] as? FileProtectionType, FileProtectionType.none) +#endif XCTAssertTrue(FileManager.default.fileExists(atPath: fileURL.path)) XCTAssertEqual(marker.isPresent, true) }