Skip to content

Commit 25ba367

Browse files
committed
Always test copying directory first
1 parent f1982b3 commit 25ba367

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/FoundationEssentialsTests/FileManager/FileManagerTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,9 @@ final class FileManagerTests : XCTestCase {
513513
#if os(Windows)
514514
XCTAssertEqual($0.delegateCaptures.shouldCopy.sorted(), [.init("dir", "dir2"), .init("dir/bar", "dir2/bar"), .init("dir/foo", "dir2/foo")].sorted())
515515
#else
516-
XCTAssertEqual($0.delegateCaptures.shouldCopy.sorted(), [.init("dir", "dir2"), .init("dir/foo", "dir2/foo"), .init("dir/bar", "dir2/bar")].sorted())
516+
var shouldCopy = $0.delegateCaptures.shouldCopy
517+
XCTAssertEqual(shouldCopy.removeFirst(), .init("dir", "dir2"))
518+
XCTAssertEqual(shouldCopy.sorted(), [.init("dir/foo", "dir2/foo"), .init("dir/bar", "dir2/bar")].sorted())
517519

518520
// Specifically for non-Windows (where copying directory metadata takes a special path) double check that the metadata was copied exactly
519521
XCTAssertEqual(try $0.attributesOfItem(atPath: "dir2")[.posixPermissions] as? UInt, 0o777)

0 commit comments

Comments
 (0)