Skip to content

Disable tests that use the internet #945

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 1 commit into from
Apr 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions TestFoundation/TestNSXMLDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class TestNSXMLDocument : XCTestCase {
("test_processingInstruction", test_processingInstruction),
("test_parseXMLString", test_parseXMLString),
("test_prefixes", test_prefixes),
("test_validation_success", test_validation_success),
("test_validation_failure", test_validation_failure),
// ("test_validation_success", test_validation_success),
// ("test_validation_failure", test_validation_failure),
("test_dtd", test_dtd),
("test_documentWithDTD", test_documentWithDTD),
("test_dtd_attributes", test_dtd_attributes)
Expand All @@ -56,7 +56,7 @@ class TestNSXMLDocument : XCTestCase {
("test_processingInstruction", test_processingInstruction),
("test_parseXMLString", test_parseXMLString),
("test_prefixes", test_prefixes),
("test_validation_success", test_validation_success),
// ("test_validation_success", test_validation_success),
// ("test_validation_failure", test_validation_failure),
("test_dtd", test_dtd),
// ("test_documentWithDTD", test_documentWithDTD),
Expand Down Expand Up @@ -289,6 +289,8 @@ class TestNSXMLDocument : XCTestCase {
XCTAssertEqual(element.localName, "root")
}

/*
* <rdar://31567922> Re-enable these tests in a way that does not depend on the internet.
func test_validation_success() throws {
let validString = "<?xml version=\"1.0\" standalone=\"yes\"?><!DOCTYPE foo [ <!ELEMENT foo (#PCDATA)> ]><foo>Hello world</foo>"
do {
Expand Down Expand Up @@ -330,7 +332,7 @@ class TestNSXMLDocument : XCTestCase {
} catch let error as NSError {
XCTAssert((error.userInfo[NSLocalizedDescriptionKey] as! String).contains("Element true was declared EMPTY this one has content"))
}
}
}*/

func test_dtd() throws {
let node = XMLNode.dtdNode(withXMLString:"<!ELEMENT foo (#PCDATA)>") as! XMLDTDNode
Expand Down