Lines Matching refs:tt_want

2410 	tt_want(evhttp_add_header(&headers, "One", "Two") == 0);
2411 tt_want(evhttp_add_header(&headers, "One", "Two\r\n Three") == 0);
2412 tt_want(evhttp_add_header(&headers, "One\r", "Two") == -1);
2413 tt_want(evhttp_add_header(&headers, "One\n", "Two") == -1);
2414 tt_want(evhttp_add_header(&headers, "One", "Two\r") == -1);
2415 tt_want(evhttp_add_header(&headers, "One", "Two\n") == -1);
2426 tt_want(strcmp(real_val, value) == 0);
2440 tt_want(validate_header(&headers, "q", "test") == 0);
2445 tt_want(validate_header(&headers, "q", "test") == 0);
2446 tt_want(validate_header(&headers, "foo", "bar") == 0);
2451 tt_want(validate_header(&headers, "q", "test foo") == 0);
2456 tt_want(validate_header(&headers, "q", "test\nfoo") == 0);
2461 tt_want(validate_header(&headers, "q", "test\rfoo") == 0);
2470 tt_want(validate_header(&headers, "q", "test this") == 0);
2476 tt_want(validate_header(&headers, "q", "test") == 0);
2477 tt_want(validate_header(&headers, "q2", "foo") == 0);
2494 tt_want(validate_header(&headers, "q", "") == 0);
2495 tt_want(validate_header(&headers, "q2", "") == 0);
2496 tt_want(validate_header(&headers, "q3", "") == 0);
2516 tt_want(validate_header(&headers, "q", "test") == 0);
2537 tt_want(ret != NULL); \
2538 tt_want(ret == url_tmp); \
2543 tt_want(evhttp_uri_join(NULL, 0, 0) == NULL);
2544 tt_want(evhttp_uri_join(NULL, url_tmp, 0) == NULL);
2545 tt_want(evhttp_uri_join(NULL, url_tmp, sizeof(url_tmp)) == NULL);
2562 tt_want(evhttp_uri_join(uri, url_tmp, \
2605 tt_want(0==evhttp_uri_set_host(uri, "www.example.com"));
2606 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) != NULL);
2608 tt_want(evhttp_uri_join(uri, url_tmp, 3) == NULL);
2610 tt_want(0==evhttp_uri_set_path(uri, "hi_mom"));
2611 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) == NULL);
2612 tt_want(evhttp_uri_join(uri, NULL, sizeof(url_tmp))==NULL);
2613 tt_want(evhttp_uri_join(uri, url_tmp, 0)==NULL);
2616 tt_want(uri != NULL);
2617 tt_want(evhttp_uri_get_host(uri) == NULL);
2618 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2619 tt_want(evhttp_uri_get_port(uri) == -1);
2620 tt_want(!strcmp(evhttp_uri_get_scheme(uri), "mailto"));
2621 tt_want(!strcmp(evhttp_uri_get_path(uri), "foo@bar"));
2622 tt_want(evhttp_uri_get_query(uri) == NULL);
2623 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2629 tt_want(-1 == evhttp_uri_set_scheme(uri,""));
2630 tt_want(-1 == evhttp_uri_set_scheme(uri,"33"));
2631 tt_want(-1 == evhttp_uri_set_scheme(uri,"hi!"));
2632 tt_want(-1 == evhttp_uri_set_userinfo(uri,"hello@"));
2633 tt_want(-1 == evhttp_uri_set_host(uri,"[1.2.3.4]"));
2634 tt_want(-1 == evhttp_uri_set_host(uri,"["));
2635 tt_want(-1 == evhttp_uri_set_host(uri,"www.[foo].com"));
2636 tt_want(-1 == evhttp_uri_set_port(uri,-3));
2637 tt_want(-1 == evhttp_uri_set_path(uri,"hello?world"));
2638 tt_want(-1 == evhttp_uri_set_query(uri,"hello#world"));
2639 tt_want(-1 == evhttp_uri_set_fragment(uri,"hello#world"));
2641 tt_want(0 == evhttp_uri_set_scheme(uri,"http"));
2642 tt_want(0 == evhttp_uri_set_scheme(uri,NULL));
2643 tt_want(0 == evhttp_uri_set_userinfo(uri,"username:pass"));
2644 tt_want(0 == evhttp_uri_set_userinfo(uri,NULL));
2645 tt_want(0 == evhttp_uri_set_host(uri,"www.example.com"));
2646 tt_want(0 == evhttp_uri_set_host(uri,"1.2.3.4"));
2647 tt_want(0 == evhttp_uri_set_host(uri,"[1:2:3:4::]"));
2648 tt_want(0 == evhttp_uri_set_host(uri,"[v7.wobblewobble]"));
2649 tt_want(0 == evhttp_uri_set_host(uri,NULL));
2650 tt_want(0 == evhttp_uri_set_host(uri,""));
2651 tt_want(0 == evhttp_uri_set_port(uri, -1));
2652 tt_want(0 == evhttp_uri_set_port(uri, 80));
2653 tt_want(0 == evhttp_uri_set_port(uri, 65535));
2654 tt_want(0 == evhttp_uri_set_path(uri, ""));
2655 tt_want(0 == evhttp_uri_set_path(uri, "/documents/public/index.html"));
2656 tt_want(0 == evhttp_uri_set_path(uri, NULL));
2657 tt_want(0 == evhttp_uri_set_query(uri, "key=val&key2=val2"));
2658 tt_want(0 == evhttp_uri_set_query(uri, "keyvalblarg"));
2659 tt_want(0 == evhttp_uri_set_query(uri, ""));
2660 tt_want(0 == evhttp_uri_set_query(uri, NULL));
2661 tt_want(0 == evhttp_uri_set_fragment(uri, ""));
2662 tt_want(0 == evhttp_uri_set_fragment(uri, "here?i?am"));
2663 tt_want(0 == evhttp_uri_set_fragment(uri, NULL));
2668 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2669 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2670 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2671 tt_want(strcmp(evhttp_uri_get_query(uri), "q=t%33est") == 0);
2672 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2673 tt_want(evhttp_uri_get_port(uri) == -1);
2674 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2679 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2680 tt_want(strcmp(evhttp_uri_get_host(uri), "%77ww.test.com") == 0);
2681 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2682 tt_want(evhttp_uri_get_query(uri) == NULL);
2683 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2684 tt_want(evhttp_uri_get_port(uri) == -1);
2685 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2690 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2691 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2692 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2693 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2694 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2695 tt_want(evhttp_uri_get_port(uri) == -1);
2696 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2701 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2702 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2703 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2704 tt_want(evhttp_uri_get_query(uri) == NULL);
2705 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2706 tt_want(evhttp_uri_get_port(uri) == -1);
2712 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2713 tt_want(strcmp(evhttp_uri_get_host(uri), "8000") == 0);
2714 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2715 tt_want(evhttp_uri_get_query(uri) == NULL);
2716 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2717 tt_want(evhttp_uri_get_port(uri) == -1);
2718 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2723 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2724 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2725 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2726 tt_want(evhttp_uri_get_query(uri) == NULL);
2727 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2728 tt_want(evhttp_uri_get_port(uri) == 8000);
2729 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2734 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2735 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2737 tt_want(evhttp_uri_get_query(uri) == NULL);
2738 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2739 tt_want(evhttp_uri_get_port(uri) == -1);
2740 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2745 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2746 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2747 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2748 tt_want(evhttp_uri_get_query(uri) == NULL);
2749 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2750 tt_want(evhttp_uri_get_port(uri) == -1);
2751 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2756 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2757 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2758 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2759 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2760 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2761 tt_want(evhttp_uri_get_port(uri) == -1);
2762 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2767 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2768 tt_want(strcmp(evhttp_uri_get_host(uri), "[::1]") == 0);
2769 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2770 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2771 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2772 tt_want(evhttp_uri_get_port(uri) == 999);
2773 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2778 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2779 tt_want(strcmp(evhttp_uri_get_host(uri), "[ff00::127.0.0.1]") == 0);
2780 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2781 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2782 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2783 tt_want(evhttp_uri_get_port(uri) == -1);
2784 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2789 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2790 tt_want(strcmp(evhttp_uri_get_host(uri), "[v99.not_(any:time)_soon]") == 0);
2791 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2792 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2793 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2794 tt_want(evhttp_uri_get_port(uri) == -1);
2795 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2800 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2801 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user:pass") == 0);
2802 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2803 tt_want(evhttp_uri_get_port(uri) == 42);
2804 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2805 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test&s=some+thing") == 0);
2806 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2811 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2812 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user") == 0);
2813 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2814 tt_want(evhttp_uri_get_port(uri) == -1);
2815 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2816 tt_want(evhttp_uri_get_query(uri) == NULL);
2817 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2822 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2823 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "%75ser") == 0);
2824 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2825 tt_want(evhttp_uri_get_port(uri) == -1);
2826 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2827 tt_want(evhttp_uri_get_query(uri) == NULL);
2828 tt_want(strcmp(evhttp_uri_get_fragment(uri), "frag@ment") == 0);
2833 tt_want(strcmp(evhttp_uri_get_scheme(uri), "file") == 0);
2834 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2835 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2836 tt_want(evhttp_uri_get_port(uri) == -1);
2837 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the/file") == 0);
2838 tt_want(evhttp_uri_get_query(uri) == NULL);
2839 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2844 tt_want(uri != NULL);
2845 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2846 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2847 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2848 tt_want(evhttp_uri_get_port(uri) == -1);
2849 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the-file") == 0);
2850 tt_want(evhttp_uri_get_query(uri) == NULL);
2851 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2856 tt_want(uri != NULL);
2857 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2858 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2859 tt_want(evhttp_uri_get_host(uri) == NULL);
2860 tt_want(evhttp_uri_get_port(uri) == -1);
2861 tt_want(strcmp(evhttp_uri_get_path(uri), "/s:ome/path/to/the-file") == 0);
2862 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99") == 0);
2863 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fred") == 0);
2868 tt_want(uri != NULL);
2869 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2870 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2871 tt_want(evhttp_uri_get_host(uri) == NULL);
2872 tt_want(evhttp_uri_get_port(uri) == -1);
2873 tt_want(strcmp(evhttp_uri_get_path(uri), "relative/path/with/co:lon") == 0);
2874 tt_want(evhttp_uri_get_query(uri) == NULL);
2875 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2880 tt_want(uri != NULL);
2881 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2882 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2883 tt_want(evhttp_uri_get_host(uri) == NULL);
2884 tt_want(evhttp_uri_get_port(uri) == -1);
2885 tt_want(strcmp(evhttp_uri_get_path(uri), "bob") == 0);
2886 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99&q2=q?33") == 0);
2887 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);
2892 tt_want(uri != NULL);
2893 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2894 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2895 tt_want(evhttp_uri_get_host(uri) == NULL);
2896 tt_want(evhttp_uri_get_port(uri) == -1);
2897 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2898 tt_want(evhttp_uri_get_query(uri) == NULL);
2899 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);