- dynstr_init(d);
- cgi_opentag(sink_dynstr(d), "element",
- "foo", "bar",
- "foo", "has space",
- "foo", "has \"quotes\"",
- (char *)NULL);
- dynstr_terminate(d);
- check_string(d->vec, "<element foo=bar foo=\"has space\" foo=\"has "quotes"\">");
-
- dynstr_init(d);
- cgi_opentag(sink_dynstr(d), "element",
- "foo", (char *)NULL,
- (char *)NULL);
- dynstr_terminate(d);
- check_string(d->vec, "<element foo>");
-
- dynstr_init(d);
- cgi_closetag(sink_dynstr(d), "element");
- dynstr_terminate(d);
- check_string(d->vec, "</element>");
-