diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
commit | 0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch) | |
tree | 3f3789daa2f6db22da6e55e92bee0062a7d613fe /src/auth/test-main.c | |
parent | Initial commit. (diff) | |
download | dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip |
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/auth/test-main.c')
-rw-r--r-- | src/auth/test-main.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/auth/test-main.c b/src/auth/test-main.c new file mode 100644 index 0000000..762c34b --- /dev/null +++ b/src/auth/test-main.c @@ -0,0 +1,39 @@ +/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */ + +#include "lib.h" +#include "auth-settings.h" +#include "test-common.h" +#include "test-auth.h" +#include "password-scheme.h" +#include "passdb.h" + +int main(int argc, const char *argv[]) +{ + const char *match = ""; + int ret; + static const struct named_test test_functions[] = { + TEST_NAMED(test_auth_request_var_expand) + TEST_NAMED(test_auth_request_fields) + TEST_NAMED(test_db_dict_parse_cache_key) + TEST_NAMED(test_username_filter) +#if defined(BUILTIN_LUA) + TEST_NAMED(test_db_lua) +#endif + { NULL, NULL } + }; + + password_schemes_init(); + passdbs_init(); + passdb_mock_mod_init(); + + if (argc > 2 && strcasecmp(argv[1], "--match") == 0) + match = argv[2]; + + ret = test_run_named(test_functions, match); + + passdb_mock_mod_deinit(); + password_schemes_deinit(); + passdbs_deinit(); + + return ret; +} |