Fix file URL in test-static-stdlib#143
Conversation
|
Linux smoke test passed at swiftlang/swift#75354 |
|
All smoke tests passed |
etcwilde
left a comment
There was a problem hiding this comment.
At least trying it on my mac, let u = URL(fileURLWithPath: "file:///foo") outputs file:/foo as the relative path. Should we continue to ensure that the outputs still match across implementations or does the root change expected to alter the behavior everywhere?
We're working on updating the behavior to be the same across all Darwin and non-Darwin platforms, where not compressing the slashes will be expected behavior |
URL(fileURLWithPath:)takes a URL path that doesn't include thefile:scheme, soURL(fileURLWithPath: "file:///foo")treats the entirefile:///fooas a relative path (since it doesn't start with a/).In swiftlang/swift-foundation#792, we updated relative path parsing to no longer compress slashes (matching the behavior of all common RFC 3986 and WHATWG parsers), so the output of
u.relativePathchanged fromfile:/footofile:///foo, causing this test to fail.This PR updates the test to use the file URL API as expected and updates the check in accordance, e.g.
and should fix the Linux builds.