i2pd/tests/test-http-merge_chunked.cpp
Михаил Подивилов fdb0ce6703 I2P -> .NET
2019-05-11 18:25:50 +03:00

25 lines
416 B
C++

#include <cassert>
#include "../HTTP.h"
using namespace dotnet::http;
int main() {
const char *buf =
"4\r\n"
"HTTP\r\n"
"A\r\n"
" response \r\n"
"E\r\n"
"with \r\n"
"chunks.\r\n"
"0\r\n"
"\r\n"
;
std::stringstream in(buf);
std::stringstream out;
assert(MergeChunkedResponse(in, out) == true);
assert(out.str() == "HTTP response with \r\nchunks.");
return 0;
}