From: Aki Tuomi Date: Mon, 29 Oct 2018 12:43:11 +0000 (+0200) Subject: auth: test-lua - Fix inconsistent whitespace X-Git-Tag: 2.3.9~1147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fea1932bd7fe35abdcffbf976bf71d19e084d4c7;p=thirdparty%2Fdovecot%2Fcore.git auth: test-lua - Fix inconsistent whitespace --- diff --git a/src/auth/test-lua.c b/src/auth/test-lua.c index fce41b3516..ec41999753 100644 --- a/src/auth/test-lua.c +++ b/src/auth/test-lua.c @@ -10,39 +10,39 @@ static void test_db_lua_auth_verify(void) { - struct auth_settings set; - i_zero(&set); - global_auth_settings = &set; + struct auth_settings set; + i_zero(&set); + global_auth_settings = &set; - struct auth_request *req = auth_request_new_dummy(); - req->passdb = passdb_mock(); - req->debug = TRUE; - req->user = "testuser"; + struct auth_request *req = auth_request_new_dummy(); + req->passdb = passdb_mock(); + req->debug = TRUE; + req->user = "testuser"; - static const char *luascript = + static const char *luascript = "function auth_password_verify(req, pass)\n" " req:log_debug(\"user \" .. req.user)\n" " if req:password_verify(\"{SHA256-CRYPT}$5$XtUywQCSjW0zAJgE$YjuPKQnsLuH4iE9kranZyy1lbil5IrRUfs7X6EyJyG1\", pass) then\n" " return dovecot.auth.PASSDB_RESULT_OK, {}\n" " end\n" "end\n"; - const char *error = NULL; - struct dlua_script *script = NULL; + const char *error = NULL; + struct dlua_script *script = NULL; - test_begin("auth db lua passdb_verify"); + test_begin("auth db lua passdb_verify"); - test_assert(dlua_script_create_string(luascript, &script, NULL, &error) == 0); - test_assert(auth_lua_script_init(script, &error) == 0); - if (script != NULL) { + test_assert(dlua_script_create_string(luascript, &script, NULL, &error) == 0); + test_assert(auth_lua_script_init(script, &error) == 0); + if (script != NULL) { test_assert(auth_lua_call_password_verify(script, req, "password", &error) == 1); if (error != NULL) i_debug("error = %s", error); - } - dlua_script_unref(&script); - i_free(req->passdb); - auth_request_unref(&req); + } + dlua_script_unref(&script); + i_free(req->passdb); + auth_request_unref(&req); - test_end(); + test_end(); } static void test_db_lua_auth_lookup(void)