From 5afed34d6264a68df927ca29d433b575a299ef84 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Mon, 5 Apr 2021 23:58:12 +0300 Subject: [PATCH] Added skel for SMTP test function; --- src/.gitignore | 1 + src/Makefile.am | 8 ++++++-- src/tests/.gitignore | 1 + src/tests/testsmtp.c | 48 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/tests/testsmtp.c diff --git a/src/.gitignore b/src/.gitignore index b0f7895..9546959 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,3 +1,4 @@ ejabberdauth .deps testimap +testsmtp diff --git a/src/Makefile.am b/src/Makefile.am index a7f9547..0a46aeb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ AM_CFLAGS = -Wall -g if BUILD_TESTS -bin_PROGRAMS = ejabberdauth testimap +bin_PROGRAMS = ejabberdauth testimap testsmtp else bin_PROGRAMS = ejabberdauth endif @@ -20,8 +20,12 @@ ejabberdauth_SOURCES = main.c eport.c tls.c imap.c smtp.c ejabberdauth_LDADD = $(LIBS) $(OPENSSL_LIBS) if BUILD_TESTS -testimap_SOURCES = tls.c imap.c tests/testimap.c tests/misc.c +testimap_SOURCES = tls.c imap.c tests/misc.c tests/testimap.c testimap_LDADD = $(LIBS) $(OPENSSL_LIBS) + +testsmtp_SOURCES = tls.c smtp.c tests/misc.c tests/testsmtp.c + +testsmtp_LDADD = $(LIBS) $(OPENSSL_LIBS) endif diff --git a/src/tests/.gitignore b/src/tests/.gitignore index 89cb10b..ac0f4d4 100644 --- a/src/tests/.gitignore +++ b/src/tests/.gitignore @@ -1,2 +1,3 @@ testimap .dirstamp +testsmtp diff --git a/src/tests/testsmtp.c b/src/tests/testsmtp.c new file mode 100644 index 0000000..2a6878a --- /dev/null +++ b/src/tests/testsmtp.c @@ -0,0 +1,48 @@ +/* + * ejabberd external authentication program + * + * (c) Alexander Vdolainen 2013, 2018, 2019, 2021 + * + * this is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * this is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see ."; + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PRG_NAME "ejabberauth smtp function test" + +int main(int argc, char **argv) +{ + return 0; +} + +