/* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
#include "test-lib.h"
#include "str-find.h"
{
bool ret;
/* divide text into every possible block combination and test that
it matches */
for (i = 0; i < max; i++) {
for (j = 0; j < text_len; j++) {
if ((i & (1 << j)) != 0) {
break;
}
pos = j + 1;
}
}
}
if (expected_pos < 0) {
if (ret)
return FALSE;
} else {
if (!ret)
return FALSE;
if ((int)pos != expected_pos)
return FALSE;
}
}
return TRUE;
}
struct str_find_input {
const char *str;
int pos;
};
void test_str_find(void)
{
static const char *fail_input[] = {
"xabc",
"xabd",
"abd"
};
const char *key, *p;
unsigned int i;
/* we'll get a search key for all substrings of text */
T_BEGIN {
} T_END;
if (!success)
break;
}
}
}