Skip to content

Commit cde744f

Browse files
committed
Fix test
1 parent de1daf4 commit cde744f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/Foundation/Tests/TestFileManager.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,16 @@ class TestFileManager : XCTestCase {
275275

276276
// test unExecutable if file has no permissions
277277
try fm.setAttributes([.posixPermissions : NSNumber(value: Int16(0o0000))], ofItemAtPath: path)
278-
#if os(Windows)
279-
// Files are always executable on Windows
280-
XCTAssertTrue(fm.isExecutableFile(atPath: path))
281-
#else
282278
XCTAssertFalse(fm.isExecutableFile(atPath: path))
283-
#endif
284279

285280
// test executable if file has execute permissions
286281
try fm.setAttributes([.posixPermissions : NSNumber(value: Int16(0o0100))], ofItemAtPath: path)
282+
#if os(Windows)
283+
// a Windows executable needs to be binary
284+
XCTAssertFalse(fm.isExecutableFile(atPath: path))
285+
#else
287286
XCTAssertTrue(fm.isExecutableFile(atPath: path))
287+
#endif
288288
} catch let e {
289289
XCTFail("\(e)")
290290
}

0 commit comments

Comments
 (0)