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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/testsuite.in:1:   START_MARKER      define(setup_request_test,[[    test_do( add_constant("R", Protocols.HTTP.Server.Request()) )    test_do([[    class FD {    inherit Stdio.FakeFile; -  function read_cb; -  function close_cb; -  void set_nonblocking(function r, mixed x, function c) { -  read_cb = r; -  close_cb = c; -  } +     void add(string s) {    read_cb(0, s);    } -  void set_read_callback(function r) { -  read_cb = r; -  } +     };    add_constant("FD",FD(""));    ]])    test_do( R->attach_fd(FD, 0, lambda(object x){} ); )   ]])      define(clear_request_test,[[    test_do( add_constant("R") )    test_do( add_constant("FD") )   ]])