diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-01-04 14:29:57 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-01-04 14:29:57 +0100 |
commit | 5bddfe7b7336f6b48408c72955dbcb664cc4dc97 (patch) | |
tree | a3d0a03edb7b70c50b40649d5869265a3db98f06 | |
parent | e405330e04dc344797f00c12cf8fd7f63b17e0e4 (diff) | |
download | irssi-5bddfe7b7336f6b48408c72955dbcb664cc4dc97.zip |
add new test skeleton
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | tests/irc/Makefile.am | 4 | ||||
-rw-r--r-- | tests/irc/flood/Makefile.am | 32 | ||||
-rw-r--r-- | tests/irc/flood/test-796.c | 29 |
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(); +} |