Skip to content

SR-10717: var kind: XMLNode.Kind { get } should return a correct value on Linux. #2287

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

Merged
merged 4 commits into from
Jun 6, 2019

Conversation

YOCKOW
Copy link
Member

@YOCKOW YOCKOW commented May 20, 2019

As shown below, some kinds of nodes return incorrect values as var kind: XMLNode.Kind. This PR fixes the issue.

print((XMLNode.processingInstruction(withName: "name", stringValue: "value") as? XMLNode)?.kind == .processingInstruction)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print((XMLNode.comment(withStringValue: "comment") as? XMLNode)?.kind == .comment)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print((XMLNode.text(withStringValue: "text") as? XMLNode)?.kind == .text)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

print(XMLDTDNode(xmlString: #"<!NOTATION f SYSTEM "F">"#)?.kind == .notationDeclaration)
// -> Prints "true" on macOS.
// -> Prints "false" on Linux.

Resolves SR-10717.

@millenomi
Copy link
Contributor

@swift-ci please test

@YOCKOW
Copy link
Member Author

YOCKOW commented May 25, 2019

Is the failure on Linux caused by this fix...?

@spevans
Copy link
Contributor

spevans commented May 25, 2019

The build failure is unrelated to this fix.

@spevans
Copy link
Contributor

spevans commented May 25, 2019

@swift-ci test

@YOCKOW
Copy link
Member Author

YOCKOW commented May 27, 2019

Another error again.
By the way, can't anyone like me trigger "@swift-ci test"?

@spevans
Copy link
Contributor

spevans commented May 27, 2019

@swift-ci test linux

@spevans
Copy link
Contributor

spevans commented May 27, 2019

@YOCKOW See https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci about having access to trigger CI requests.

@YOCKOW
Copy link
Member Author

YOCKOW commented May 27, 2019

@spevans
Thank you for the answer, and please forgive me for having overlooked the document.

@spevans
Copy link
Contributor

spevans commented May 27, 2019

@swift-ci test linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants