diff --git a/Tests/TaggedNodeCorpusRoundTripTests.swift b/Tests/TaggedNodeCorpusRoundTripTests.swift index 4aca297..0235e63 100644 --- a/Tests/TaggedNodeCorpusRoundTripTests.swift +++ b/Tests/TaggedNodeCorpusRoundTripTests.swift @@ -31,7 +31,13 @@ struct TaggedNodeCorpusRoundTripTests { let order = names.indices.sorted { names[$0] < names[$1] } for index in order { let url = urls[index] - let source = try String(contentsOf: url, encoding: .utf8) + // `String(contentsOf: url, encoding:)` itself hit the same NSURL/URL confusion on + // this toolchain regardless of how `url` was obtained (a bare `for url in urls` with + // no sort at all reproduces it too). `contentsOfFile:` takes a `String` path -- a + // type this toolchain's Foundation does not have two conflicting URL/NSURL overloads + // for -- sidestepping the ambiguity at its actual point of failure instead of + // upstream of it. + let source = try String(contentsOfFile: url.path, encoding: .utf8) let parsed: PureYAML.Tagged.Node do { parsed = try PureYAML.parseTagged(source)