-
Notifications
You must be signed in to change notification settings - Fork 114
Draft: FilePath.ComponentView #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds mocking and tracing infrastructure, test infrastructure, and trace-based tests.
Adds in testing infrastructure and collectiony tests, as well as ad-hoc testing.
// Explicitly add a preceding separator if | ||
// replacing front with absolute components (unless redundant by trailing separator), | ||
// preceding character is not a separator (which implies at the end) | ||
let atStart = lowerBound == startIndex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Account for //
special case...
Multiple successive characters are considered to be the same as one , except for the case of exactly two leading characters.
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For POSIX, it seems to denote implementation defined path resolution:
A pathname consisting of a single shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. If a pathname begins with two successive characters, the first component following the leading characters may be interpreted in an implementation-defined manner, although more than two leading characters shall be treated as a single character.
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luckily, all signs indicate that //
is special cased on neither Darwin nor Linux, so there is no need for us to do anything about it. If so, it's okay to treat //
as a synonym of /
for the purposes of canonicalization and component extraction.
This work is superseded by FilePath syntactic operations: #14 |
* Implement UNIX domain socket addresses * Implement standalone SocketAddress.Family enum * Add availability comments * [WIP] Implement sendmsg/rcvmsg * SocketAddress: Use _RawBuffer. * ControlMessageBuffer: Fix issues uncovered in testing * Enums: use mutable rawValues This helps simplify code that needs to update these directly. * Update/simplify sendmsg/recvmsg implementations * Mocking: Add support for wildcard argument matching * Add some AncillaryMessageBuffer tests; fix issues. * Apply suggestions from code review Co-authored-by: Michael Ilseman <[email protected]> * Make mock failure output a little easier to follow * Implement support for getaddrinfo * Add an executable with very simple sample code * Add availability marker for new CInterop typealiases * Do not use implicitly unwrapped optionals * Rework sendmsg/recvmsg, make some samples * Updates/cleanups/discussion results Co-authored-by: Michael Ilseman <[email protected]>
Draft: Add FilePath.ComponentView, a Bidi RRC of components
Adds in testing infrastructure and collectiony tests, as well
as ad-hoc testing.