Lines Matching refs:tt_want

2413 	tt_want(evhttp_add_header(&headers, "One", "Two") == 0);
2414 tt_want(evhttp_add_header(&headers, "One", "Two\r\n Three") == 0);
2415 tt_want(evhttp_add_header(&headers, "One\r", "Two") == -1);
2416 tt_want(evhttp_add_header(&headers, "One\n", "Two") == -1);
2417 tt_want(evhttp_add_header(&headers, "One", "Two\r") == -1);
2418 tt_want(evhttp_add_header(&headers, "One", "Two\n") == -1);
2429 tt_want(strcmp(real_val, value) == 0);
2443 tt_want(validate_header(&headers, "q", "test") == 0);
2448 tt_want(validate_header(&headers, "q", "test") == 0);
2449 tt_want(validate_header(&headers, "foo", "bar") == 0);
2454 tt_want(validate_header(&headers, "q", "test foo") == 0);
2459 tt_want(validate_header(&headers, "q", "test\nfoo") == 0);
2464 tt_want(validate_header(&headers, "q", "test\rfoo") == 0);
2473 tt_want(validate_header(&headers, "q", "test this") == 0);
2479 tt_want(validate_header(&headers, "q", "test") == 0);
2480 tt_want(validate_header(&headers, "q2", "foo") == 0);
2497 tt_want(validate_header(&headers, "q", "") == 0);
2498 tt_want(validate_header(&headers, "q2", "") == 0);
2499 tt_want(validate_header(&headers, "q3", "") == 0);
2519 tt_want(validate_header(&headers, "q", "test") == 0);
2540 tt_want(ret != NULL); \
2541 tt_want(ret == url_tmp); \
2546 tt_want(evhttp_uri_join(NULL, 0, 0) == NULL);
2547 tt_want(evhttp_uri_join(NULL, url_tmp, 0) == NULL);
2548 tt_want(evhttp_uri_join(NULL, url_tmp, sizeof(url_tmp)) == NULL);
2565 tt_want(evhttp_uri_join(uri, url_tmp, \
2608 tt_want(0==evhttp_uri_set_host(uri, "www.example.com"));
2609 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) != NULL);
2611 tt_want(evhttp_uri_join(uri, url_tmp, 3) == NULL);
2613 tt_want(0==evhttp_uri_set_path(uri, "hi_mom"));
2614 tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) == NULL);
2615 tt_want(evhttp_uri_join(uri, NULL, sizeof(url_tmp))==NULL);
2616 tt_want(evhttp_uri_join(uri, url_tmp, 0)==NULL);
2619 tt_want(uri != NULL);
2620 tt_want(evhttp_uri_get_host(uri) == NULL);
2621 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2622 tt_want(evhttp_uri_get_port(uri) == -1);
2623 tt_want(!strcmp(evhttp_uri_get_scheme(uri), "mailto"));
2624 tt_want(!strcmp(evhttp_uri_get_path(uri), "foo@bar"));
2625 tt_want(evhttp_uri_get_query(uri) == NULL);
2626 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2632 tt_want(-1 == evhttp_uri_set_scheme(uri,""));
2633 tt_want(-1 == evhttp_uri_set_scheme(uri,"33"));
2634 tt_want(-1 == evhttp_uri_set_scheme(uri,"hi!"));
2635 tt_want(-1 == evhttp_uri_set_userinfo(uri,"hello@"));
2636 tt_want(-1 == evhttp_uri_set_host(uri,"[1.2.3.4]"));
2637 tt_want(-1 == evhttp_uri_set_host(uri,"["));
2638 tt_want(-1 == evhttp_uri_set_host(uri,"www.[foo].com"));
2639 tt_want(-1 == evhttp_uri_set_port(uri,-3));
2640 tt_want(-1 == evhttp_uri_set_path(uri,"hello?world"));
2641 tt_want(-1 == evhttp_uri_set_query(uri,"hello#world"));
2642 tt_want(-1 == evhttp_uri_set_fragment(uri,"hello#world"));
2644 tt_want(0 == evhttp_uri_set_scheme(uri,"http"));
2645 tt_want(0 == evhttp_uri_set_scheme(uri,NULL));
2646 tt_want(0 == evhttp_uri_set_userinfo(uri,"username:pass"));
2647 tt_want(0 == evhttp_uri_set_userinfo(uri,NULL));
2648 tt_want(0 == evhttp_uri_set_host(uri,"www.example.com"));
2649 tt_want(0 == evhttp_uri_set_host(uri,"1.2.3.4"));
2650 tt_want(0 == evhttp_uri_set_host(uri,"[1:2:3:4::]"));
2651 tt_want(0 == evhttp_uri_set_host(uri,"[v7.wobblewobble]"));
2652 tt_want(0 == evhttp_uri_set_host(uri,NULL));
2653 tt_want(0 == evhttp_uri_set_host(uri,""));
2654 tt_want(0 == evhttp_uri_set_port(uri, -1));
2655 tt_want(0 == evhttp_uri_set_port(uri, 80));
2656 tt_want(0 == evhttp_uri_set_port(uri, 65535));
2657 tt_want(0 == evhttp_uri_set_path(uri, ""));
2658 tt_want(0 == evhttp_uri_set_path(uri, "/documents/public/index.html"));
2659 tt_want(0 == evhttp_uri_set_path(uri, NULL));
2660 tt_want(0 == evhttp_uri_set_query(uri, "key=val&key2=val2"));
2661 tt_want(0 == evhttp_uri_set_query(uri, "keyvalblarg"));
2662 tt_want(0 == evhttp_uri_set_query(uri, ""));
2663 tt_want(0 == evhttp_uri_set_query(uri, NULL));
2664 tt_want(0 == evhttp_uri_set_fragment(uri, ""));
2665 tt_want(0 == evhttp_uri_set_fragment(uri, "here?i?am"));
2666 tt_want(0 == evhttp_uri_set_fragment(uri, NULL));
2671 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2672 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2673 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2674 tt_want(strcmp(evhttp_uri_get_query(uri), "q=t%33est") == 0);
2675 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2676 tt_want(evhttp_uri_get_port(uri) == -1);
2677 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2682 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2683 tt_want(strcmp(evhttp_uri_get_host(uri), "%77ww.test.com") == 0);
2684 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2685 tt_want(evhttp_uri_get_query(uri) == NULL);
2686 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2687 tt_want(evhttp_uri_get_port(uri) == -1);
2688 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2693 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2694 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2695 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2696 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2697 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2698 tt_want(evhttp_uri_get_port(uri) == -1);
2699 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2704 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2705 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2706 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2707 tt_want(evhttp_uri_get_query(uri) == NULL);
2708 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2709 tt_want(evhttp_uri_get_port(uri) == -1);
2715 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2716 tt_want(strcmp(evhttp_uri_get_host(uri), "8000") == 0);
2717 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2718 tt_want(evhttp_uri_get_query(uri) == NULL);
2719 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2720 tt_want(evhttp_uri_get_port(uri) == -1);
2721 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2726 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2727 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2728 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2729 tt_want(evhttp_uri_get_query(uri) == NULL);
2730 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2731 tt_want(evhttp_uri_get_port(uri) == 8000);
2732 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2737 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2738 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2740 tt_want(evhttp_uri_get_query(uri) == NULL);
2741 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2742 tt_want(evhttp_uri_get_port(uri) == -1);
2743 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2748 tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
2749 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2750 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2751 tt_want(evhttp_uri_get_query(uri) == NULL);
2752 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2753 tt_want(evhttp_uri_get_port(uri) == -1);
2754 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2759 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2760 tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
2761 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2762 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2763 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2764 tt_want(evhttp_uri_get_port(uri) == -1);
2765 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2770 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2771 tt_want(strcmp(evhttp_uri_get_host(uri), "[::1]") == 0);
2772 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2773 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2774 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2775 tt_want(evhttp_uri_get_port(uri) == 999);
2776 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2781 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2782 tt_want(strcmp(evhttp_uri_get_host(uri), "[ff00::127.0.0.1]") == 0);
2783 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2784 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2785 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2786 tt_want(evhttp_uri_get_port(uri) == -1);
2787 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2792 tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
2793 tt_want(strcmp(evhttp_uri_get_host(uri), "[v99.not_(any:time)_soon]") == 0);
2794 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2795 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
2796 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2797 tt_want(evhttp_uri_get_port(uri) == -1);
2798 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2803 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2804 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user:pass") == 0);
2805 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2806 tt_want(evhttp_uri_get_port(uri) == 42);
2807 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2808 tt_want(strcmp(evhttp_uri_get_query(uri), "q=test&s=some+thing") == 0);
2809 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2814 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2815 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user") == 0);
2816 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2817 tt_want(evhttp_uri_get_port(uri) == -1);
2818 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2819 tt_want(evhttp_uri_get_query(uri) == NULL);
2820 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
2825 tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
2826 tt_want(strcmp(evhttp_uri_get_userinfo(uri), "%75ser") == 0);
2827 tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
2828 tt_want(evhttp_uri_get_port(uri) == -1);
2829 tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
2830 tt_want(evhttp_uri_get_query(uri) == NULL);
2831 tt_want(strcmp(evhttp_uri_get_fragment(uri), "frag@ment") == 0);
2836 tt_want(strcmp(evhttp_uri_get_scheme(uri), "file") == 0);
2837 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2838 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2839 tt_want(evhttp_uri_get_port(uri) == -1);
2840 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the/file") == 0);
2841 tt_want(evhttp_uri_get_query(uri) == NULL);
2842 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2847 tt_want(uri != NULL);
2848 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2849 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2850 tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
2851 tt_want(evhttp_uri_get_port(uri) == -1);
2852 tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the-file") == 0);
2853 tt_want(evhttp_uri_get_query(uri) == NULL);
2854 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2859 tt_want(uri != NULL);
2860 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2861 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2862 tt_want(evhttp_uri_get_host(uri) == NULL);
2863 tt_want(evhttp_uri_get_port(uri) == -1);
2864 tt_want(strcmp(evhttp_uri_get_path(uri), "/s:ome/path/to/the-file") == 0);
2865 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99") == 0);
2866 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fred") == 0);
2871 tt_want(uri != NULL);
2872 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2873 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2874 tt_want(evhttp_uri_get_host(uri) == NULL);
2875 tt_want(evhttp_uri_get_port(uri) == -1);
2876 tt_want(strcmp(evhttp_uri_get_path(uri), "relative/path/with/co:lon") == 0);
2877 tt_want(evhttp_uri_get_query(uri) == NULL);
2878 tt_want(evhttp_uri_get_fragment(uri) == NULL);
2883 tt_want(uri != NULL);
2884 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2885 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2886 tt_want(evhttp_uri_get_host(uri) == NULL);
2887 tt_want(evhttp_uri_get_port(uri) == -1);
2888 tt_want(strcmp(evhttp_uri_get_path(uri), "bob") == 0);
2889 tt_want(strcmp(evhttp_uri_get_query(uri), "q=99&q2=q?33") == 0);
2890 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);
2895 tt_want(uri != NULL);
2896 tt_want(evhttp_uri_get_scheme(uri) == NULL);
2897 tt_want(evhttp_uri_get_userinfo(uri) == NULL);
2898 tt_want(evhttp_uri_get_host(uri) == NULL);
2899 tt_want(evhttp_uri_get_port(uri) == -1);
2900 tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
2901 tt_want(evhttp_uri_get_query(uri) == NULL);
2902 tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);