/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "str.h"
#include "istream.h"
#include "ostream.h"
#include "ostream-dot.h"
#include "test-common.h"
struct dot_test {
const char *input;
const char *output;
};
{
const unsigned char *data;
test_assert(ret >= 0);
if (ret <= 0)
break;
}
}
static void test_ostream_dot(void)
{
{ "foo\r\n.\r\n", "foo\r\n..\r\n.\r\n" },
{ "foo\n.\n", "foo\r\n..\r\n.\r\n" },
{ ".foo\r\n.\r\nfoo\r\n", "..foo\r\n..\r\nfoo\r\n.\r\n" },
{ ".foo\n.\nfoo\n", "..foo\r\n..\r\nfoo\r\n.\r\n" },
{ "\r\n", "\r\n.\r\n" },
{ "\n", "\r\n.\r\n" },
{ "", "\r\n.\r\n" },
};
unsigned int i;
for (i = 0; i < N_ELEMENTS(tests); i++) {
test_ostream_dot_one(&tests[i]);
test_end();
}
}
int main(void)
{
static void (*const test_functions[])(void) = {
};
return test_run(test_functions);
}