• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/ntp/sntp/libevent/test/

Lines Matching refs:tt_want

2111 	tt_want(evhttp_add_header(&headers, "One", "Two") == 0);
2112 tt_want(evhttp_add_header(&headers, "One", "Two\r\n Three") == 0);
2113 tt_want(evhttp_add_header(&headers, "One\r", "Two") == -1);
2114 tt_want(evhttp_add_header(&headers, "One\n", "Two") == -1);
2115 tt_want(evhttp_add_header(&headers, "One", "Two\r") == -1);
2116 tt_want(evhttp_add_header(&headers, "One", "Two\n") == -1);
2127 tt_want(strcmp(real_val, value) == 0);
2141 tt_want(validate_header(&headers, "q", "test") == 0);
2146 tt_want(validate_header(&headers, "q", "test") == 0);
2147 tt_want(validate_header(&headers, "foo", "bar") == 0);
2152 tt_want(validate_header(&headers, "q", "test foo") == 0);
2157 tt_want(validate_header(&headers, "q", "test\nfoo") == 0);
2162 tt_want(validate_header(&headers, "q", "test\rfoo") == 0);
2171 tt_want(validate_header(&headers, "q", "test this") == 0);
2177 tt_want(validate_header(&headers, "q", "test") == 0);
2178 tt_want(validate_header(&headers, "q2", "foo") == 0);
2195 tt_want(validate_header(&headers, "q", "") == 0);
2196 tt_want(validate_header(&headers, "q2", "") == 0);
2197 tt_want(validate_header(&headers, "q3", "") == 0);
2217 tt_want(ret != NULL); \
2218 tt_want(ret == url_tmp); \
2223 tt_want(evhttp_uri_join(NULL, 0, 0) == NULL);
2224 tt_want(evhttp_uri_join(NULL, url_tmp, 0) == NULL);
2225 tt_want(evhttp_uri_join(NULL, url_tmp, sizeof(url_tmp)) == NULL);
2242 tt_want(evhttp_uri_join(uri, url_tmp, \
2285 tt_want(0==evhttp_uri_set_host(uri, "www.example.com"));
2286 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) != NULL);
2288 tt_want(evhttp_uri_join(uri, url_tmp, 3) == NULL);
2290 tt_want(0==evhttp_uri_set_path(uri, "hi_mom"));
2291 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) == NULL);
2292 tt_want(evhttp_uri_join(uri, NULL, sizeof(url_tmp))==NULL);
2293 tt_want(evhttp_uri_join(uri, url_tmp, 0)==NULL);
2296 tt_want(uri != NULL);
2297 tt_want(evhttp_uri_get_host(uri) == NULL);
2298 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2299 tt_want(evhttp_uri_get_port(uri) == -1);
2300 tt_want(!strcmp(evhttp_uri_get_scheme(uri), "mailto"));
2301 tt_want(!strcmp(evhttp_uri_get_path(uri), "foo@bar"));
2302 tt_want(evhttp_uri_get_query(uri) == NULL);
2303 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2309 tt_want(-1 == evhttp_uri_set_scheme(uri,""));
2310 tt_want(-1 == evhttp_uri_set_scheme(uri,"33"));
2311 tt_want(-1 == evhttp_uri_set_scheme(uri,"hi!"));
2312 tt_want(-1 == evhttp_uri_set_userinfo(uri,"hello@"));
2313 tt_want(-1 == evhttp_uri_set_host(uri,"[1.2.3.4]"));
2314 tt_want(-1 == evhttp_uri_set_host(uri,"["));
2315 tt_want(-1 == evhttp_uri_set_host(uri,"www.[foo].com"));
2316 tt_want(-1 == evhttp_uri_set_port(uri,-3));
2317 tt_want(-1 == evhttp_uri_set_path(uri,"hello?world"));
2318 tt_want(-1 == evhttp_uri_set_query(uri,"hello#world"));
2319 tt_want(-1 == evhttp_uri_set_fragment(uri,"hello#world"));
2321 tt_want(0 == evhttp_uri_set_scheme(uri,"http"));
2322 tt_want(0 == evhttp_uri_set_scheme(uri,NULL));
2323 tt_want(0 == evhttp_uri_set_userinfo(uri,"username:pass"));
2324 tt_want(0 == evhttp_uri_set_userinfo(uri,NULL));
2325 tt_want(0 == evhttp_uri_set_host(uri,"www.example.com"));
2326 tt_want(0 == evhttp_uri_set_host(uri,"1.2.3.4"));
2327 tt_want(0 == evhttp_uri_set_host(uri,"[1:2:3:4::]"));
2328 tt_want(0 == evhttp_uri_set_host(uri,"[v7.wobblewobble]"));
2329 tt_want(0 == evhttp_uri_set_host(uri,NULL));
2330 tt_want(0 == evhttp_uri_set_host(uri,""));
2331 tt_want(0 == evhttp_uri_set_port(uri, -1));
2332 tt_want(0 == evhttp_uri_set_port(uri, 80));
2333 tt_want(0 == evhttp_uri_set_port(uri, 65535));
2334 tt_want(0 == evhttp_uri_set_path(uri, ""));
2335 tt_want(0 == evhttp_uri_set_path(uri, "/documents/public/index.html"));
2336 tt_want(0 == evhttp_uri_set_path(uri, NULL));
2337 tt_want(0 == evhttp_uri_set_query(uri, "key=val&key2=val2"));
2338 tt_want(0 == evhttp_uri_set_query(uri, "keyvalblarg"));
2339 tt_want(0 == evhttp_uri_set_query(uri, ""));
2340 tt_want(0 == evhttp_uri_set_query(uri, NULL));
2341 tt_want(0 == evhttp_uri_set_fragment(uri, ""));
2342 tt_want(0 == evhttp_uri_set_fragment(uri, "here?i?am"));
2343 tt_want(0 == evhttp_uri_set_fragment(uri, NULL));
2348 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2349 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2350 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2351 tt_want(strcmp(evhttp_uri_get_query(uri), "q=t%33est") == 0);
2352 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2353 tt_want(evhttp_uri_get_port(uri) == -1);
2354 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2359 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2360 tt_want(strcmp(evhttp_uri_get_host(uri), "%77ww.test.com") == 0);
2361 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2362 tt_want(evhttp_uri_get_query(uri) == NULL);
2363 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2364 tt_want(evhttp_uri_get_port(uri) == -1);
2365 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2370 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2371 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2372 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2373 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2374 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2375 tt_want(evhttp_uri_get_port(uri) == -1);
2376 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2381 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2382 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2383 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2384 tt_want(evhttp_uri_get_query(uri) == NULL);
2385 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2386 tt_want(evhttp_uri_get_port(uri) == -1);
2392 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2393 tt_want(strcmp(evhttp_uri_get_host(uri), "8000") == 0);
2394 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2395 tt_want(evhttp_uri_get_query(uri) == NULL);
2396 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2397 tt_want(evhttp_uri_get_port(uri) == -1);
2398 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2403 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2404 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2405 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2406 tt_want(evhttp_uri_get_query(uri) == NULL);
2407 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2408 tt_want(evhttp_uri_get_port(uri) == 8000);
2409 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2414 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2415 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2417 tt_want(evhttp_uri_get_query(uri) == NULL);
2418 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2419 tt_want(evhttp_uri_get_port(uri) == -1);
2420 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2425 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2426 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2427 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2428 tt_want(evhttp_uri_get_query(uri) == NULL);
2429 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2430 tt_want(evhttp_uri_get_port(uri) == -1);
2431 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2436 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2437 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2438 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2439 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2440 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2441 tt_want(evhttp_uri_get_port(uri) == -1);
2442 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2447 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2448 tt_want(strcmp(evhttp_uri_get_host(uri), "[::1]") == 0);
2449 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2450 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2451 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2452 tt_want(evhttp_uri_get_port(uri) == 999);
2453 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2458 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2459 tt_want(strcmp(evhttp_uri_get_host(uri), "[ff00::127.0.0.1]") == 0);
2460 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2461 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2462 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2463 tt_want(evhttp_uri_get_port(uri) == -1);
2464 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2469 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2470 tt_want(strcmp(evhttp_uri_get_host(uri), "[v99.not_(any:time)_soon]") == 0);
2471 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2472 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2473 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2474 tt_want(evhttp_uri_get_port(uri) == -1);
2475 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2480 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2481 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user:pass") == 0);
2482 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2483 tt_want(evhttp_uri_get_port(uri) == 42);
2484 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2485 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test&s=some+thing") == 0);
2486 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2491 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2492 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user") == 0);
2493 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2494 tt_want(evhttp_uri_get_port(uri) == -1);
2495 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2496 tt_want(evhttp_uri_get_query(uri) == NULL);
2497 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2502 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2503 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "%75ser") == 0);
2504 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2505 tt_want(evhttp_uri_get_port(uri) == -1);
2506 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2507 tt_want(evhttp_uri_get_query(uri) == NULL);
2508 tt_want(strcmp(evhttp_uri_get_fragment(uri), "frag@ment") == 0);
2513 tt_want(strcmp(evhttp_uri_get_scheme(uri), "file") == 0);
2514 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2515 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2516 tt_want(evhttp_uri_get_port(uri) == -1);
2517 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the/file") == 0);
2518 tt_want(evhttp_uri_get_query(uri) == NULL);
2519 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2524 tt_want(uri != NULL);
2525 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2526 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2527 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2528 tt_want(evhttp_uri_get_port(uri) == -1);
2529 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the-file") == 0);
2530 tt_want(evhttp_uri_get_query(uri) == NULL);
2531 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2536 tt_want(uri != NULL);
2537 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2538 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2539 tt_want(evhttp_uri_get_host(uri) == NULL);
2540 tt_want(evhttp_uri_get_port(uri) == -1);
2541 tt_want(strcmp(evhttp_uri_get_path(uri), "/s:ome/path/to/the-file") == 0);
2542 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99") == 0);
2543 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fred") == 0);
2548 tt_want(uri != NULL);
2549 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2550 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2551 tt_want(evhttp_uri_get_host(uri) == NULL);
2552 tt_want(evhttp_uri_get_port(uri) == -1);
2553 tt_want(strcmp(evhttp_uri_get_path(uri), "relative/path/with/co:lon") == 0);
2554 tt_want(evhttp_uri_get_query(uri) == NULL);
2555 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2560 tt_want(uri != NULL);
2561 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2562 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2563 tt_want(evhttp_uri_get_host(uri) == NULL);
2564 tt_want(evhttp_uri_get_port(uri) == -1);
2565 tt_want(strcmp(evhttp_uri_get_path(uri), "bob") == 0);
2566 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99&q2=q?33") == 0);
2567 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);
2572 tt_want(uri != NULL);
2573 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2574 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2575 tt_want(evhttp_uri_get_host(uri) == NULL);
2576 tt_want(evhttp_uri_get_port(uri) == -1);
2577 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2578 tt_want(evhttp_uri_get_query(uri) == NULL);
2579 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);