Skip to content

Commit 83f6e2c

Browse files
committed
Make large JSON patch test also work via the SPM.
1 parent 3713062 commit 83f6e2c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Tests/DynamicJSONTests/JSONPatchLargeTest.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ final class JSONPatchLargeTest: XCTestCase {
1313

1414
private func jsonFileURL(_ filename: String) throws -> URL? {
1515
let bundle = Bundle(for: type(of: self))
16-
guard let url = bundle.url(forResource: filename,
17-
withExtension: "json",
18-
subdirectory: "JSONPatch") else {
19-
return nil
16+
if let url = bundle.url(forResource: filename,
17+
withExtension: "json",
18+
subdirectory: "JSONPatch") {
19+
return url
2020
}
21-
return url
21+
let url = URL(fileURLWithPath: "Tests/DynamicJSONTests/ComplianceTests/JSONPatch/\(filename).json")
22+
return FileManager.default.fileExists(atPath: url.path) ? url : nil
2223
}
2324

2425
private func loadJSON(_ filename: String) throws -> JSON? {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy