-
Notifications
You must be signed in to change notification settings - Fork 114
disable broken test case on Windows #101
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,7 +231,7 @@ final class FilePathComponentsTest: XCTestCase { | |
} | ||
|
||
func testCases() { | ||
let testPaths: Array<TestPathComponents> = [ | ||
var testPaths: Array<TestPathComponents> = [ | ||
TestPathComponents("", root: nil, []), | ||
TestPathComponents("/", root: "/", []), | ||
TestPathComponents("foo", root: nil, ["foo"]), | ||
|
@@ -244,11 +244,16 @@ final class FilePathComponentsTest: XCTestCase { | |
TestPathComponents("/foo///bar", root: "/", ["foo", "bar"]), | ||
TestPathComponents("foo/bar/", root: nil, ["foo", "bar"]), | ||
TestPathComponents("foo///bar/baz/", root: nil, ["foo", "bar", "baz"]), | ||
TestPathComponents("//foo///bar/baz/", root: "/", ["foo", "bar", "baz"]), | ||
TestPathComponents("./", root: nil, ["."]), | ||
TestPathComponents("./..", root: nil, [".", ".."]), | ||
TestPathComponents("/./..//", root: "/", [".", ".."]), | ||
] | ||
#if !os(Windows) | ||
// See https://github.com/apple/swift-system/issues/137 | ||
testPaths += [ | ||
TestPathComponents("//foo///bar/baz/", root: "/", ["foo", "bar", "baz"]), | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On Windows, would it become something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I need to check, but that is what I would expect. However, I don't remember if this was a case where we were asserting incorrectly or not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we fix up incomplete roots and make them complete. C# seems to be pretty inconsistent / emergent-behaviorish here, but that's the only sensible model I could think of at the time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that the model is correct in that the behaviour is what we would like. The question is more about whether the behaviour matches the implementation or not (aka, there is a bug - I think that we were asserting on an empty path component somewhere?). Sorry if it came across as I didn't think that the behaviour was correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Path components cannot be empty, but I wonder if we should allow empty server or share portions of a UNC path root. Sorry, I've paged a lot of this out and am just getting back up to speed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. > [IO.Path]::GetFullPath("//foo///bar/baz/")
\\foo\bar\baz\
> [IO.Path]::GetPathRoot("//foo///bar/baz/")
\\foo\bar
> [IO.Path]::GetPathRoot([IO.Path]::GetFullPath("//foo///bar/baz/"))
\\foo\bar This also matches the Microsoft documentation on path normalization:
|
||
#endif | ||
testPaths.forEach { $0.runAllTests() } | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.