X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e7eb3a2744aa45179daea235800753d3d1955338..0f839d0f799eeb778cf085fea3a8a7715fc72ddf:/libtests/t-cgi.c diff --git a/libtests/t-cgi.c b/libtests/t-cgi.c index 44b7c29..f621495 100644 --- a/libtests/t-cgi.c +++ b/libtests/t-cgi.c @@ -26,7 +26,7 @@ static void input_from(const char *s) { || fputs("wibble wibble\r\nspong", fp) < 0 /* ensure CONTENT_LENGTH * honored */ || fflush(fp) < 0) - fatal(errno, "writing to temporary file"); + disorder_fatal(errno, "writing to temporary file"); rewind(fp); xdup2(fileno(fp), 0); lseek(0, 0/*offset*/, SEEK_SET); @@ -35,7 +35,6 @@ static void input_from(const char *s) { } static void test_cgi(void) { - struct dynstr d[1]; setenv("REQUEST_METHOD", "GET", 1); setenv("QUERY_STRING", "foo=bar&a=b+c&c=x%7ey", 1); @@ -112,27 +111,6 @@ static void test_cgi(void) { check_string(cgi_sgmlquote("\"&\""), ""&""); check_string(cgi_sgmlquote("\xC2\xA3"), "£"); - 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, ""); - - dynstr_init(d); - cgi_opentag(sink_dynstr(d), "element", - "foo", (char *)NULL, - (char *)NULL); - dynstr_terminate(d); - check_string(d->vec, ""); - - dynstr_init(d); - cgi_closetag(sink_dynstr(d), "element"); - dynstr_terminate(d); - check_string(d->vec, ""); - check_string(cgi_makeurl("http://example.com/", (char *)NULL), "http://example.com/"); check_string(cgi_makeurl("http://example.com/",