pike.git / src / modules / _Roxen / testsuite.in

version» Context lines:

pike.git/src/modules/_Roxen/testsuite.in:46:   ]])      test_eval_error(_Roxen.make_http_headers(0))      test_mkhttp( ([]), ({}) )   test_mkhttp( (["":""]), ({": "}) )   test_mkhttp( (["a":"1","b":"2"]), ({"a: 1","b: 2"}) )   test_mkhttp( (["a":"1","b":({"2","3"})]), ({"a: 1","b: 2","b: 3"}) )   test_mkhttp( (["a":"1","b":({"2","2"})]), ({"a: 1","b: 2","b: 2"}) )    + test_eval_error(_Roxen.make_http_headers((["a:1": "1"]))) + test_eval_error(_Roxen.make_http_headers((["a\rb": "1"]))) + test_eval_error(_Roxen.make_http_headers((["a\nb": "1"]))) + test_eval_error(_Roxen.make_http_headers(([" a:1": "1"]))) + test_eval_error(_Roxen.make_http_headers((["a": "1\r"]))) + test_eval_error(_Roxen.make_http_headers((["a": "1\n"]))) + test_eval_error(_Roxen.make_http_headers((["a": ({ "1\r\nb:2", "2\r\nc:2" }))))) +    define(test_hp,[[    test_do( add_constant("hp", _Roxen.HeaderParser()) )    test_equal( hp->feed( $1 ), $2)    test_do( add_constant("hp") )   ]])      test_hp( "GET / HTTP/1.0\r\nblaha: foo\nbar\r\nzonk: 1\r\n\r\n",   ({ "", "GET / HTTP/1.0", ([ "blaha":"foo", "zonk":"1" ]) }) )      test_hp( "GET / HTTP/1.0\r\nblaha: foo\r\nzonk: 1\r\n\r\n",   ({ "", "GET / HTTP/1.0", ([ "blaha":"foo", "zonk":"1" ]) }) )      test_hp( "GET / HTTP/1.0\r\nblaha: foo\n\rblaha: bar\r\n\r\n",   ({ "", "GET / HTTP/1.0", ([ "blaha":({ "foo", "bar" }) ]) }) )      END_MARKER