Adapt for new repository
Some checks failed
CI / verify-linuxmain (push) Has been cancelled
CI / apple (macos-10.15, iOS) (push) Has been cancelled
CI / apple (macos-10.15, macOS) (push) Has been cancelled
CI / apple (macos-10.15, tvOS) (push) Has been cancelled
CI / apple (macos-10.15, watchOS) (push) Has been cancelled
CI / apple (macos-11, iOS) (push) Has been cancelled
CI / apple (macos-11, macOS) (push) Has been cancelled
CI / apple (macos-11, tvOS) (push) Has been cancelled
CI / apple (macos-11, watchOS) (push) Has been cancelled
CI / linux (swift:4.2) (push) Has been cancelled
CI / linux (swift:5.0) (push) Has been cancelled
CI / linux (swift:5.1) (push) Has been cancelled
CI / linux (swift:5.2) (push) Has been cancelled
CI / linux (swift:5.3) (push) Has been cancelled
CI / linux (swift:5.4) (push) Has been cancelled
CI / linux (swiftlang/swift:nightly-5.5) (push) Has been cancelled

This commit is contained in:
T. R. Bernstein
2025-09-30 12:13:17 +02:00
parent dbdc3aeef6
commit 5d164c34f3
10 changed files with 338 additions and 181 deletions

View File

@@ -1,5 +1,5 @@
import XCTest
import Path
import PathKit
extension PathTests {
func testFindMaxDepth1() throws {
@@ -148,7 +148,7 @@ extension PathTests {
Set(tmpdir.find().hidden(true)),
Set([dotFoo,tmpDotA,tmpDotAFoo,tmpB,tmpBFoo]),
relativeTo: tmpdir)
#if !os(Linux) || swift(>=5)
XCTAssertEqual(
Set(tmpdir.find().hidden(false)),
@@ -157,7 +157,7 @@ extension PathTests {
#endif
}
}
func testFindExtension() throws {
try Path.mktemp { tmpdir in
try tmpdir.join("foo.json").touch()

View File

@@ -1,4 +1,4 @@
@testable import Path
@testable import PathKit
import func XCTest.XCTAssertEqual
import Foundation
import XCTest
@@ -54,7 +54,7 @@ class PathTests: XCTestCase {
XCTAssertEqual(["b.swift"], Set(lsrv.files.filter{ $0.extension == "swift" }.map{ $0.relative(to: tmpdir) }))
XCTAssertEqual(["c"], Set(lsrv.files.filter{ $0.extension == "" }.map{ $0.relative(to: tmpdir) }))
XCTAssertEqual(paths, ["a", "b.swift", "c", ".d"])
}
func testEnumerationSkippingHiddenFiles() throws {
@@ -64,7 +64,7 @@ class PathTests: XCTestCase {
try tmpdir.join("b").touch()
try tmpdir.join("c").touch()
try tmpdir.join(".d").mkdir().join("e").touch()
var paths = Set<String>()
var dirs = 0
for path in tmpdir.ls() {
@@ -688,7 +688,7 @@ class PathTests: XCTestCase {
XCTAssertEqual(bar.type, .symlink)
}
}
func testOptionalInitializer() throws {
XCTAssertNil(Path(""))
XCTAssertNil(Path("./foo"))

View File

@@ -1,4 +1,4 @@
@testable import Path
@testable import PathKit
import Foundation
class TemporaryDirectory {

View File

@@ -1,5 +1,5 @@
import XCTest
import Path
import PathKit
#if swift(>=5.3)
func XCTAssertEqual<P: Pathish>(_ set1: Set<Path>, _ set2: Set<Path>, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line, relativeTo: P) {