ObjFW  Check-in [91d438b5d2]

Overview
Comment:Also test comments in -[stringValue].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 91d438b5d26ad658b730e39afd8bd4558a12f938923bc3cb082ef44c43fe886c
User & Date: js on 2011-04-09 12:30:42
Other Links: manifest | tags
Context
2011-04-09
15:41
OFXMLParser: Don't allow character data before the document. check-in: 0cc997a1d7 user: js tags: trunk
12:31
Branch for 0.5. check-in: 5203170e82 user: js tags: 0.5
12:30
Also test comments in -[stringValue]. check-in: 91d438b5d2 user: js tags: trunk
2011-04-08
07:05
Add -[isListening] to OFTCPSocket. check-in: 054a38e82d user: js tags: trunk
Changes

Modified tests/OFXMLElementTests.m from [7235d66d34] to [1e31b5bb2b].

115
116
117
118
119
120
121
122
123


124
125
126
127
128
129
130
131
132
133
115
116
117
118
119
120
121


122
123
124
125
126
127
128
129
130
131
132
133







-
-
+
+










	    R([elem[2] addChild: [OFXMLElement elementWithName: @"bar"
		      namespace: @"urn:objfw:test"]]) &&
	    [[elem[2] XMLString] isEqual:
	    @"<objfw-test:foo test='test'><objfw-test:bar/></objfw-test:foo>"])

	TEST(@"+[elementWithXMLString:] and -[stringValue]",
	    [[[OFXMLElement elementWithXMLString:
	    @"<x>foo<![CDATA[bar]]><y>baz</y>qux</x>"] stringValue] isEqual:
	    @"foobarbazqux"])
	    @"<x>foo<![CDATA[bar]]><y>b<!-- fooo -->az</y>qux</x>"] stringValue]
	    isEqual: @"foobarbazqux"])

	TEST(@"-[elementsForName:namespace:]",
	    (a = [elem[2] elementsForName: @"bar"
				namespace: @"urn:objfw:test"]) &&
	    [a count] == 1 && [[[a firstObject] XMLString] isEqual:
	    @"<bar xmlns='urn:objfw:test'/>"])

	[pool drain];
}
@end