testcase rename

parent 875969d4
......@@ -211,7 +211,7 @@ struct expect {
const char *u, *h, **pfx;
};
static const char *pfx_host[7] = {
static const char *pfx_ws_host[7] = {
"https://",
"http://",
"//",
......@@ -221,7 +221,7 @@ static const char *pfx_host[7] = {
NULL
};
static const char *pfx_nohost[2] = {
static const char *pfx_ws_nohost[2] = {
"",
NULL
};
......@@ -242,15 +242,15 @@ static const char *invalid[10] = {
NULL
};
static struct expect testcase[9] = {
{ .u = "/url", .h = "host", .pfx = pfx_host },
{ .u = "/", .h = "host", .pfx = pfx_host },
{ .u = "///", .h = "ho-t", .pfx = pfx_host },
{ .u = "/", .h = "h", .pfx = pfx_host },
{ .u = "///", .h = "h", .pfx = pfx_host },
{ .u = "/url", .h = NULL, .pfx = pfx_nohost },
{ .u = "/", .h = NULL, .pfx = pfx_nohost },
{ .u = "/a", .h = NULL, .pfx = pfx_nohost },
static struct expect tc_ws[9] = {
{ .u = "/url", .h = "host", .pfx = pfx_ws_host },
{ .u = "/", .h = "host", .pfx = pfx_ws_host },
{ .u = "///", .h = "ho-t", .pfx = pfx_ws_host },
{ .u = "/", .h = "h", .pfx = pfx_ws_host },
{ .u = "///", .h = "h", .pfx = pfx_ws_host },
{ .u = "/url", .h = NULL, .pfx = pfx_ws_nohost },
{ .u = "/", .h = NULL, .pfx = pfx_ws_nohost },
{ .u = "/a", .h = NULL, .pfx = pfx_ws_nohost },
{ NULL }
};
......@@ -335,7 +335,7 @@ main(void) {
t = s;
assert(tok(t, strchr(s, '\0'), "https://"));
for (want = testcase; want->u != NULL; want++) {
for (want = tc_ws; want->u != NULL; want++) {
INIT_OBJ(zis, ZFR_ITER_MAGIC);
zis->priv = NULL;
zis->func = cb_not;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment