test-strfuncs.c revision 89b3a2a06a87e66798d21998c8ddf525c3946e7f
/* Copyright (c) 2009-2012 Dovecot authors, see the included COPYING file */
#include "test-lib.h"
#include <stdlib.h>
static void test_p_strarray_dup(void)
{
const char *input[][3] = {
{ NULL },
{ "a", NULL },
{ "foobar", NULL },
};
const char **ret;
unsigned int i, j;
test_begin("p_strarray_dup");
for (i = 0; i < N_ELEMENTS(input); i++) {
}
}
test_end();
}
static void strsplit_verify(const char *str)
{
T_BEGIN {
unsigned int i;
} T_END;
}
static void test_t_strsplit_tab(void)
{
char buf[4096];
unsigned int i, j, max;
test_begin("t_strsplit_tab");
strsplit_verify("");
strsplit_verify("\t");
strsplit_verify("\t\t");
strsplit_verify("foo");
strsplit_verify("foo\tbar");
strsplit_verify("foo\tbar\tbaz");
strsplit_verify("foo\t\tbaz");
for (i = 0; i < sizeof(buf)-1; i++)
buf[i] = '\t';
for (j = 0; j < 256; j++) {
}
for (j = 0; j < 100; j++) {
for (i = 0; i < max; i++) {
if (rand() % 10 == 0)
buf[i] = '\t';
else
buf[i] = 'x';
}
}
test_end();
}
void test_strfuncs(void)
{
}