summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--tests/irc/Makefile.am4
-rw-r--r--tests/irc/flood/Makefile.am32
-rw-r--r--tests/irc/flood/test-796.c29
4 files changed, 65 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 76ada09f..61e96149 100644
--- a/configure.ac
+++ b/configure.ac
@@ -665,6 +665,7 @@ tests/fe-common/Makefile
tests/fe-common/core/Makefile
tests/irc/Makefile
tests/irc/core/Makefile
+tests/irc/flood/Makefile
docs/Makefile
docs/help/Makefile
docs/help/in/Makefile
diff --git a/tests/irc/Makefile.am b/tests/irc/Makefile.am
index 52770885..d42cfc87 100644
--- a/tests/irc/Makefile.am
+++ b/tests/irc/Makefile.am
@@ -1 +1,3 @@
-SUBDIRS = core
+SUBDIRS = \
+ core \
+ flood
diff --git a/tests/irc/flood/Makefile.am b/tests/irc/flood/Makefile.am
new file mode 100644
index 00000000..4bc4a93c
--- /dev/null
+++ b/tests/irc/flood/Makefile.am
@@ -0,0 +1,32 @@
+include $(top_srcdir)/utils/glib-tap.mk
+
+PACKAGE_STRING=irc/flood
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/src/core \
+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
+ $(GLIB_CFLAGS)
+
+test_programs = \
+ test-796
+
+test_796_CPPFLAGS = \
+ -I$(top_srcdir)/src/irc/core \
+ -I$(top_srcdir)/src/irc/flood \
+ $(AM_CPPFLAGS)
+
+test_796_DEPENDENCIES = \
+ ../../../src/core/libcore.a \
+ ../../../src/lib-config/libirssi_config.a
+
+test_796_LDADD = \
+ ../../../src/irc/flood/libirc_flood.a \
+ ../../../src/irc/core/libirc_core.a \
+ ../../../src/core/libcore.a \
+ ../../../src/lib-config/libirssi_config.a \
+ @GLIB_LIBS@ \
+ @OPENSSL_LIBS@
+
+test_796_SOURCES = \
+ test-796.c
diff --git a/tests/irc/flood/test-796.c b/tests/irc/flood/test-796.c
new file mode 100644
index 00000000..9ca29489
--- /dev/null
+++ b/tests/irc/flood/test-796.c
@@ -0,0 +1,29 @@
+/*
+ test-796.c : irssi
+
+ Copyright (C) 2017 The Irssi project.
+
+ This program 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 program 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, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include "common.h"
+
+int main(int argc, char **argv)
+{
+ g_test_init(&argc, &argv, NULL);
+
+ g_test_set_nonfatal_assertions();
+ return g_test_run();
+}