spec/net_http_parser_spec.lua
branch0.12
changeset 12886 9ed628635dc6
parent 11037 cb5555443852
child 12893 94a99330ce87
equal deleted inserted replaced
12885:91baddaeea84 12886:9ed628635dc6
    85 0
    85 0
    86 
    86 
    87 
    87 
    88 ]],
    88 ]],
    89 				{
    89 				{
    90 					body = "Hello", count = 2;
    90 					body = "Hello", count = 3;
    91 				}
    91 				}
    92 			);
    92 			);
    93 		end);
    93 		end);
    94 
    94 
    95 		it("should handle a stream of responses", function ()
    95 		it("should handle a stream of responses", function ()
   114 0
   114 0
   115 
   115 
   116 
   116 
   117 ]],
   117 ]],
   118 				{
   118 				{
   119 					body = "Hello", count = 3;
   119 					body = "Hello", count = 4;
   120 				}
   120 				}
   121 			);
   121 			);
   122 		end);
   122 		end);
   123 	end);
   123 	end);
   124 
   124 
   127 
   127 
   128 		-- Just a sanity check... text editors and things may mess with line endings, etc.
   128 		-- Just a sanity check... text editors and things may mess with line endings, etc.
   129 		assert.equal("25930f021785ae14053a322c2dbc1897c3769720", sha1(data, true), "test data malformed");
   129 		assert.equal("25930f021785ae14053a322c2dbc1897c3769720", sha1(data, true), "test data malformed");
   130 
   130 
   131 		test_stream(data, {
   131 		test_stream(data, {
   132 			body = string.rep("~", 11085), count = 2;
   132 			body = string.rep("~", 11085), count = 3;
   133 		});
   133 		});
   134 	end);
   134 	end);
   135 end);
   135 end);