pike.git / lib / modules / Protocols.pmod / HTTP.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/testsuite.in:9:   test_do([[   class A {    inherit H.Query;       string _server;    int _port;    string _query;    mapping|string _headers;    string _data;    +  int ok = 1; +     this_program sync_request(string server, int port, string query, void|mapping|string headers, void|string data) {       _server = server;    _port = port;    _query = query;    _headers = headers;    _data = data; -  ok = 1; +     return this;    }       array params() { return ({ _server, _port, _query, _headers, _data }); }   };   add_constant("CON",A);   ]])      dnl do_proxied_method   
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/testsuite.in:114:    m_delete(h, "user-agent");    return h;   ]], (["host":0]))   test_any_equal([[    object o = H.do_method("GET","http://x",0,(["a":({"1","2"})]),CON());    mapping h = o->_headers;    m_delete(h, "user-agent");    return h;   ]], (["host":"x","a":({"1","2"})]))    + test_any_equal([[ +  object o = H.do_method("GET","http://x/?a=b&c=d",0,0,CON()); +  return o->_query; + ]], "GET /?a=b&c=d HTTP/1.0") + test_any_equal([[ +  object o = H.do_method("GET","http://x/?a=b&c=d",(["x":"y"]),0,CON()); +  return o->_query; + ]], "GET /?a=b&c=d&x=y HTTP/1.0") + test_any_equal([[ +  object o = H.do_method("GET","http://x/",(["x":"y"]),0,CON()); +  return o->_query; + ]], "GET /?x=y HTTP/1.0")    -  + test_any_equal([[ +  object o = H.do_method("GET","http://x",0,0,CON()); +  return o->_query; + ]], "GET / HTTP/1.0") +  + test_eval_error([[ +  CON c = CON(); +  c->ok = 0; +  c->errno = 1; +  object o = H.do_method("GET","http://x/",(["x":"y"]),0,c); + ]]) +  +  +    dnl do_async_method   dnl do_async_proxied_method   dnl get_url   dnl put_url   dnl delete_url   dnl get_url_nice   dnl get_url_data   dnl post_url   dnl post_url_nice   dnl post_url_data