config.h
config.h.in
config.log
-config.log
config.status
configure
ctrlproxy
po/POTFILES
po/ctrlproxy.pot
po/stamp-po
-rfctester/ircdtorture
-rfctester/test-*.so
tags
testlinestack
testsuite/*.so
testsuite/ctrlproxyrc.torture
-testsuite/torture
mods/python2/__init__.py
testsuite/test-state
doc/*.html
# Unit tests
-testsuite/check: testsuite/test-cmp.o testsuite/test-isupport.o testsuite/test-parser.o testsuite/test-state.o testsuite/test-util.o testsuite/torture.o $(objs)
+testsuite/check: testsuite/test-cmp.o testsuite/test-user.o testsuite/test-isupport.o testsuite/test-parser.o testsuite/test-state.o testsuite/test-util.o testsuite/torture.o $(objs)
@echo Linking $@
@$(CC) $(LIBS) -o $@ $^ -lcheck
fail_if (str_rfc1459cmp("abcde", "ABCDE") != 0);
fail_if (str_rfc1459cmp("abcde~{}", "ABCDE^[]") != 0);
fail_if (str_asciicmp("abcde", "ABCDE") != 0);
+ fail_if (str_asciicmp("abcde[]", "ABCDE[]") != 0);
+ fail_if (str_asciicmp("abcde{}", "ABCDE[]") == 0);
fail_if (str_strictrfc1459cmp("abcde{}", "ABCDE[]") != 0);
fail_if (str_strictrfc1459cmp("abcde{}^", "ABCDE[]~") == 0);
fail_if (str_strictrfc1459cmp("abcde{}", "abcde{}") != 0);
--- /dev/null
+/*
+ ircdtorture: an IRC RFC compliancy tester
+ (c) 2005 Jelmer Vernooij <jelmer@nl.linux.org>
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <check.h>
+#include "internals.h"
+
+START_TEST(test_create)
+ struct global *gl;
+
+ gl = new_global(DEFAULT_CONFIG_DIR);
+
+ fail_if(gl == NULL, "new_global returned NULL");
+
+ free_global(gl);
+END_TEST
+
+Suite *user_suite()
+{
+ Suite *s = suite_create("testsuite");
+ TCase *tc_core = tcase_create("core");
+ suite_add_tcase(s, tc_core);
+ tcase_add_test(tc_core, test_create);
+ return s;
+}
+
Suite *isupport_suite(void);
Suite *cmp_suite(void);
Suite *parser_suite(void);
+Suite *user_suite(void);
int main (void)
{
srunner_add_suite(sr, isupport_suite());
srunner_add_suite(sr, cmp_suite());
srunner_add_suite(sr, parser_suite());
+ srunner_add_suite(sr, user_suite());
srunner_run_all (sr, CK_NORMAL);
nf = srunner_ntests_failed(sr);
srunner_free(sr);