190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
const char *str = "bar<foo:bar bar='b&az' qux:qux=\" quux \">\r\n"
"foo<bar<qux >bar <baz name='' test='&foo;'/> quxbar\r\n</qux>"
"</foo:bar><!-- foo bär-baz -->";
size_t j, len;
TEST(@"+[xmlParser]", (parser = [OFXMLParser xmlParser]))
TEST(@"-[setDelegate:]", [parser setDelegate: self])
/* Simulate a stream where we only get chunks */
len = strlen(str);
for (j = 0; j < len; j+= 2) {
if (j + 2 > len)
[parser parseBuffer: str + j
|
|
|
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
const char *str = "bar<foo:bar bar='b&az' qux:qux=\" quux \">\r\n"
"foo<bar<qux >bar <baz name='' test='&foo;'/> quxbar\r\n</qux>"
"</foo:bar><!-- foo bär-baz -->";
size_t j, len;
TEST(@"+[xmlParser]", (parser = [OFXMLParser xmlParser]))
TEST(@"-[setDelegate:]", R([parser setDelegate: self]))
/* Simulate a stream where we only get chunks */
len = strlen(str);
for (j = 0; j < len; j+= 2) {
if (j + 2 > len)
[parser parseBuffer: str + j
|