Skip to content

Commit 019f627

Browse files
authored
Merge pull request #945 from CodaFi/you-dont-surf
Disable tests that use the internet
2 parents b5797e8 + 28cb405 commit 019f627

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

TestFoundation/TestNSXMLDocument.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class TestNSXMLDocument : XCTestCase {
3636
("test_processingInstruction", test_processingInstruction),
3737
("test_parseXMLString", test_parseXMLString),
3838
("test_prefixes", test_prefixes),
39-
("test_validation_success", test_validation_success),
40-
("test_validation_failure", test_validation_failure),
39+
// ("test_validation_success", test_validation_success),
40+
// ("test_validation_failure", test_validation_failure),
4141
("test_dtd", test_dtd),
4242
("test_documentWithDTD", test_documentWithDTD),
4343
("test_dtd_attributes", test_dtd_attributes)
@@ -56,7 +56,7 @@ class TestNSXMLDocument : XCTestCase {
5656
("test_processingInstruction", test_processingInstruction),
5757
("test_parseXMLString", test_parseXMLString),
5858
("test_prefixes", test_prefixes),
59-
("test_validation_success", test_validation_success),
59+
// ("test_validation_success", test_validation_success),
6060
// ("test_validation_failure", test_validation_failure),
6161
("test_dtd", test_dtd),
6262
// ("test_documentWithDTD", test_documentWithDTD),
@@ -289,6 +289,8 @@ class TestNSXMLDocument : XCTestCase {
289289
XCTAssertEqual(element.localName, "root")
290290
}
291291

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

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

0 commit comments

Comments
 (0)