/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "auth-request.h"
#include "auth-cache.h"
#include "test-common.h"
/* these 3 must be in this order */
};
{
return ret;
}
static void test_auth_cache_parse_key(void)
{
static const struct {
} tests[] = {
{ "%n@%d", "%u" },
{ "%{username}@%{domain}", "%u" },
{ "%n%d%u", "%u" },
{ "%n", "%n" },
{ "%d", "%d" },
{ "%a%b%u", "%u\t%a\t%b" },
{ "foo%5.5Mabar", "%a" },
{ "foo%5.5M{longb}bar", "%{longb}" },
{ "foo%5.5Mcbar", "%c" },
{ "foo%5.5M{longc}bar", "%c" },
{ "%a%b", "%a\t%b" },
{ "%a%{longb}%a", "%a\t%{longb}" },
{ "%{longc}%c", "%c" },
{ "%c%a%{longc}%c", "%a\t%c" },
{ "%a%{env:foo}%{env:foo}%a", "%a\t%{env:foo}\t%{env:foo}" }
};
const char *cache_key;
unsigned int i;
test_begin("auth cache parse key");
for (i = 0; i < N_ELEMENTS(tests); i++) {
}
test_end();
}
int main(void)
{
static void (*const test_functions[])(void) = {
};
return test_run(test_functions);
}