From: Richard Russon Date: Mon, 15 Apr 2019 15:55:45 +0000 (+0100) Subject: test: templates for string functions X-Git-Tag: 2019-10-25~266^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b5df151496a0c5ef2b80702720af44c9559eb6b;p=neomutt test: templates for string functions --- diff --git a/.gitignore b/.gitignore index e1e4e1fd6..5b05e3eb0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ pgpewrap test/config-test test/neomutt-test test/pattern-test +test/string-test # Build products *.o diff --git a/test/Makefile.autosetup b/test/Makefile.autosetup index 452f3cd95..cf0f6cd8d 100644 --- a/test/Makefile.autosetup +++ b/test/Makefile.autosetup @@ -23,6 +23,54 @@ PATTERN_OBJS = test/pattern/main.o \ test/pattern/extract.o \ pattern.o +STRING_OBJS = test/string/main.o \ + test/string/mutt_str_adjust.o \ + test/string/mutt_str_append_item.o \ + test/string/mutt_str_asprintf.o \ + test/string/mutt_str_atoi.o \ + test/string/mutt_str_atol.o \ + test/string/mutt_str_atos.o \ + test/string/mutt_str_atoui.o \ + test/string/mutt_str_atoul.o \ + test/string/mutt_str_atoull.o \ + test/string/mutt_str_dequote_comment.o \ + test/string/mutt_str_find_word.o \ + test/string/mutt_str_getenv.o \ + test/string/mutt_str_inline_replace.o \ + test/string/mutt_str_is_ascii.o \ + test/string/mutt_str_is_email_wsp.o \ + test/string/mutt_str_lws_len.o \ + test/string/mutt_str_lws_rlen.o \ + test/string/mutt_str_next_word.o \ + test/string/mutt_str_pretty_size.o \ + test/string/mutt_str_remall_strcasestr.o \ + test/string/mutt_str_remove_trailing_ws.o \ + test/string/mutt_str_replace.o \ + test/string/mutt_str_rstrnstr.o \ + test/string/mutt_str_skip_email_wsp.o \ + test/string/mutt_str_skip_whitespace.o \ + test/string/mutt_str_split.o \ + test/string/mutt_str_startswith.o \ + test/string/mutt_str_strcasecmp.o \ + test/string/mutt_str_strcasestr.o \ + test/string/mutt_str_strcat.o \ + test/string/mutt_str_strchrnul.o \ + test/string/mutt_str_strcmp.o \ + test/string/mutt_str_strcoll.o \ + test/string/mutt_str_strdup.o \ + test/string/mutt_str_strfcpy.o \ + test/string/mutt_str_stristr.o \ + test/string/mutt_str_strlen.o \ + test/string/mutt_str_strlower.o \ + test/string/mutt_str_strncasecmp.o \ + test/string/mutt_str_strncat.o \ + test/string/mutt_str_strncmp.o \ + test/string/mutt_str_strnfcpy.o \ + test/string/mutt_str_substr_cpy.o \ + test/string/mutt_str_substr_dup.o \ + test/string/mutt_str_sysexit.o \ + test/string/mutt_str_word_casecmp.o + CFLAGS += -I$(SRCDIR)/test TEST_BINARY = test/neomutt-test$(EXEEXT) @@ -31,11 +79,14 @@ TEST_CONFIG = test/config-test$(EXEEXT) TEST_PATTERN = test/pattern-test$(EXEEXT) +TEST_STRING = test/string-test$(EXEEXT) + .PHONY: test -test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) +test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) $(TEST_STRING) $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) + $(TEST_STRING) $(TEST_BINARY): $(TEST_OBJS) $(MUTTLIBS) $(CC) -o $@ $(TEST_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) @@ -46,18 +97,25 @@ $(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS) $(TEST_PATTERN): $(PWD)/test/pattern $(PATTERN_OBJS) $(MUTTLIBS) $(CC) -o $@ $(PATTERN_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) +$(TEST_STRING): $(PWD)/test/string $(STRING_OBJS) $(MUTTLIBS) + $(CC) -o $@ $(STRING_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) + $(PWD)/test/config: $(MKDIR_P) $(PWD)/test/config $(PWD)/test/pattern: $(MKDIR_P) $(PWD)/test/pattern -all-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) +$(PWD)/test/string: + $(MKDIR_P) $(PWD)/test/string + +all-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATTERN) $(TEST_STRING) clean-test: $(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \ $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \ - $(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) + $(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) \ + $(TEST_STRING) $(STRING_OBJS) $(STRING_OBJS:.o=.Po) install-test: uninstall-test: @@ -71,4 +129,7 @@ CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po) PATTERN_DEPFILES = $(PATTERN_OBJS:.o=.Po) -include $(PATTERN_DEPFILES) +STRING_DEPFILES = $(STRING_OBJS:.o=.Po) +-include $(STRING_DEPFILES) + # vim: set ts=8 noexpandtab: diff --git a/test/string/main.c b/test/string/main.c new file mode 100644 index 000000000..cfcf8cc20 --- /dev/null +++ b/test/string/main.c @@ -0,0 +1,66 @@ +#include "acutest.h" + +/****************************************************************************** + * Add your test cases to this list. + *****************************************************************************/ +#define NEOMUTT_TEST_LIST \ + NEOMUTT_TEST_ITEM(test_mutt_str_adjust) \ + NEOMUTT_TEST_ITEM(test_mutt_str_append_item) \ + NEOMUTT_TEST_ITEM(test_mutt_str_asprintf) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atoi) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atol) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atos) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atoui) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atoul) \ + NEOMUTT_TEST_ITEM(test_mutt_str_atoull) \ + NEOMUTT_TEST_ITEM(test_mutt_str_dequote_comment) \ + NEOMUTT_TEST_ITEM(test_mutt_str_find_word) \ + NEOMUTT_TEST_ITEM(test_mutt_str_getenv) \ + NEOMUTT_TEST_ITEM(test_mutt_str_inline_replace) \ + NEOMUTT_TEST_ITEM(test_mutt_str_is_ascii) \ + NEOMUTT_TEST_ITEM(test_mutt_str_is_email_wsp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_lws_len) \ + NEOMUTT_TEST_ITEM(test_mutt_str_lws_rlen) \ + NEOMUTT_TEST_ITEM(test_mutt_str_next_word) \ + NEOMUTT_TEST_ITEM(test_mutt_str_pretty_size) \ + NEOMUTT_TEST_ITEM(test_mutt_str_remall_strcasestr) \ + NEOMUTT_TEST_ITEM(test_mutt_str_remove_trailing_ws) \ + NEOMUTT_TEST_ITEM(test_mutt_str_replace) \ + NEOMUTT_TEST_ITEM(test_mutt_str_rstrnstr) \ + NEOMUTT_TEST_ITEM(test_mutt_str_skip_email_wsp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_skip_whitespace) \ + NEOMUTT_TEST_ITEM(test_mutt_str_split) \ + NEOMUTT_TEST_ITEM(test_mutt_str_startswith) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strcasecmp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strcasestr) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strcat) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strchrnul) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strcmp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strcoll) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strdup) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strfcpy) \ + NEOMUTT_TEST_ITEM(test_mutt_str_stristr) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strlen) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strlower) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strncasecmp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strncat) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strncmp) \ + NEOMUTT_TEST_ITEM(test_mutt_str_strnfcpy) \ + NEOMUTT_TEST_ITEM(test_mutt_str_substr_cpy) \ + NEOMUTT_TEST_ITEM(test_mutt_str_substr_dup) \ + NEOMUTT_TEST_ITEM(test_mutt_str_sysexit) \ + NEOMUTT_TEST_ITEM(test_mutt_str_word_casecmp) + +/****************************************************************************** + * You probably don't need to touch what follows. + *****************************************************************************/ +#define NEOMUTT_TEST_ITEM(x) void x(void); +NEOMUTT_TEST_LIST +#undef NEOMUTT_TEST_ITEM + +TEST_LIST = { +#define NEOMUTT_TEST_ITEM(x) { #x, x }, + NEOMUTT_TEST_LIST +#undef NEOMUTT_TEST_ITEM + { 0 } +}; diff --git a/test/string/mutt_str_adjust.c b/test/string/mutt_str_adjust.c new file mode 100644 index 000000000..09fd64994 --- /dev/null +++ b/test/string/mutt_str_adjust.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_adjust() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_adjust(void) +{ + // void mutt_str_adjust(char **p); +} diff --git a/test/string/mutt_str_append_item.c b/test/string/mutt_str_append_item.c new file mode 100644 index 000000000..f44386450 --- /dev/null +++ b/test/string/mutt_str_append_item.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_append_item() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_append_item(void) +{ + // void mutt_str_append_item(char **str, const char *item, int sep); +} diff --git a/test/string/mutt_str_asprintf.c b/test/string/mutt_str_asprintf.c new file mode 100644 index 000000000..b7b8c59cc --- /dev/null +++ b/test/string/mutt_str_asprintf.c @@ -0,0 +1,30 @@ +/** + * @file + * Test code for mutt_str_asprintf() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" + +void test_mutt_str_asprintf(void) +{ + // int mutt_str_asprintf(char **strp, const char *fmt, ...); +} diff --git a/test/string/mutt_str_atoi.c b/test/string/mutt_str_atoi.c new file mode 100644 index 000000000..edf8ce10e --- /dev/null +++ b/test/string/mutt_str_atoi.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atoi() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atoi(void) +{ + // int mutt_str_atoi(const char *str, int *dst); +} diff --git a/test/string/mutt_str_atol.c b/test/string/mutt_str_atol.c new file mode 100644 index 000000000..0bd7c0f41 --- /dev/null +++ b/test/string/mutt_str_atol.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atol() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atol(void) +{ + // int mutt_str_atol(const char *str, long *dst); +} diff --git a/test/string/mutt_str_atos.c b/test/string/mutt_str_atos.c new file mode 100644 index 000000000..3424a577d --- /dev/null +++ b/test/string/mutt_str_atos.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atos() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atos(void) +{ + // int mutt_str_atos(const char *str, short *dst); +} diff --git a/test/string/mutt_str_atoui.c b/test/string/mutt_str_atoui.c new file mode 100644 index 000000000..0631fd4db --- /dev/null +++ b/test/string/mutt_str_atoui.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atoui() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atoui(void) +{ + // int mutt_str_atoui(const char *str, unsigned int *dst); +} diff --git a/test/string/mutt_str_atoul.c b/test/string/mutt_str_atoul.c new file mode 100644 index 000000000..3e0b62673 --- /dev/null +++ b/test/string/mutt_str_atoul.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atoul() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atoul(void) +{ + // int mutt_str_atoul(const char *str, unsigned long *dst); +} diff --git a/test/string/mutt_str_atoull.c b/test/string/mutt_str_atoull.c new file mode 100644 index 000000000..b5e5f4733 --- /dev/null +++ b/test/string/mutt_str_atoull.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_atoull() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_atoull(void) +{ + // int mutt_str_atoull(const char *str, unsigned long long *dst); +} diff --git a/test/string/mutt_str_dequote_comment.c b/test/string/mutt_str_dequote_comment.c new file mode 100644 index 000000000..56924eb9c --- /dev/null +++ b/test/string/mutt_str_dequote_comment.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_dequote_comment() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_dequote_comment(void) +{ + // void mutt_str_dequote_comment(char *s); +} diff --git a/test/string/mutt_str_find_word.c b/test/string/mutt_str_find_word.c new file mode 100644 index 000000000..603da3050 --- /dev/null +++ b/test/string/mutt_str_find_word.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_find_word() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_find_word(void) +{ + // const char *mutt_str_find_word(const char *src); +} diff --git a/test/string/mutt_str_getenv.c b/test/string/mutt_str_getenv.c new file mode 100644 index 000000000..e9f09e3cd --- /dev/null +++ b/test/string/mutt_str_getenv.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_getenv() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_getenv(void) +{ + // const char *mutt_str_getenv(const char *name); +} diff --git a/test/string/mutt_str_inline_replace.c b/test/string/mutt_str_inline_replace.c new file mode 100644 index 000000000..d799fc72c --- /dev/null +++ b/test/string/mutt_str_inline_replace.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_inline_replace() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_inline_replace(void) +{ + // bool mutt_str_inline_replace(char *buf, size_t buflen, size_t xlen, const char *rstr); +} diff --git a/test/string/mutt_str_is_ascii.c b/test/string/mutt_str_is_ascii.c new file mode 100644 index 000000000..38f5dc277 --- /dev/null +++ b/test/string/mutt_str_is_ascii.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_is_ascii() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_is_ascii(void) +{ + // bool mutt_str_is_ascii(const char *p, size_t len); +} diff --git a/test/string/mutt_str_is_email_wsp.c b/test/string/mutt_str_is_email_wsp.c new file mode 100644 index 000000000..dd80fd35e --- /dev/null +++ b/test/string/mutt_str_is_email_wsp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_is_email_wsp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_is_email_wsp(void) +{ + // bool mutt_str_is_email_wsp(char c); +} diff --git a/test/string/mutt_str_lws_len.c b/test/string/mutt_str_lws_len.c new file mode 100644 index 000000000..b39c296e2 --- /dev/null +++ b/test/string/mutt_str_lws_len.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_lws_len() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_lws_len(void) +{ + // size_t mutt_str_lws_len(const char *s, size_t n); +} diff --git a/test/string/mutt_str_lws_rlen.c b/test/string/mutt_str_lws_rlen.c new file mode 100644 index 000000000..b33fba657 --- /dev/null +++ b/test/string/mutt_str_lws_rlen.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_lws_rlen() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_lws_rlen(void) +{ + // size_t mutt_str_lws_rlen(const char *s, size_t n); +} diff --git a/test/string/mutt_str_next_word.c b/test/string/mutt_str_next_word.c new file mode 100644 index 000000000..3d256adbe --- /dev/null +++ b/test/string/mutt_str_next_word.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_next_word() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_next_word(void) +{ + // const char *mutt_str_next_word(const char *s); +} diff --git a/test/string/mutt_str_pretty_size.c b/test/string/mutt_str_pretty_size.c new file mode 100644 index 000000000..f08ece3d9 --- /dev/null +++ b/test/string/mutt_str_pretty_size.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_pretty_size() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_pretty_size(void) +{ + // void mutt_str_pretty_size(char *buf, size_t buflen, size_t num); +} diff --git a/test/string/mutt_str_remall_strcasestr.c b/test/string/mutt_str_remall_strcasestr.c new file mode 100644 index 000000000..b1c800c94 --- /dev/null +++ b/test/string/mutt_str_remall_strcasestr.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_remall_strcasestr() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_remall_strcasestr(void) +{ + // int mutt_str_remall_strcasestr(char *str, const char *target); +} diff --git a/test/string/mutt_str_remove_trailing_ws.c b/test/string/mutt_str_remove_trailing_ws.c new file mode 100644 index 000000000..3ea564a2e --- /dev/null +++ b/test/string/mutt_str_remove_trailing_ws.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_remove_trailing_ws() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_remove_trailing_ws(void) +{ + // void mutt_str_remove_trailing_ws(char *s); +} diff --git a/test/string/mutt_str_replace.c b/test/string/mutt_str_replace.c new file mode 100644 index 000000000..30f8361e9 --- /dev/null +++ b/test/string/mutt_str_replace.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_replace() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_replace(void) +{ + // void mutt_str_replace(char **p, const char *s); +} diff --git a/test/string/mutt_str_rstrnstr.c b/test/string/mutt_str_rstrnstr.c new file mode 100644 index 000000000..e4d10cfa6 --- /dev/null +++ b/test/string/mutt_str_rstrnstr.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_rstrnstr() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_rstrnstr(void) +{ + // const char *mutt_str_rstrnstr(const char *haystack, size_t haystack_length, const char *needle); +} diff --git a/test/string/mutt_str_skip_email_wsp.c b/test/string/mutt_str_skip_email_wsp.c new file mode 100644 index 000000000..48d41fc28 --- /dev/null +++ b/test/string/mutt_str_skip_email_wsp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_skip_email_wsp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_skip_email_wsp(void) +{ + // char *mutt_str_skip_email_wsp(const char *s); +} diff --git a/test/string/mutt_str_skip_whitespace.c b/test/string/mutt_str_skip_whitespace.c new file mode 100644 index 000000000..1f66181ac --- /dev/null +++ b/test/string/mutt_str_skip_whitespace.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_skip_whitespace() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_skip_whitespace(void) +{ + // char *mutt_str_skip_whitespace(char *p); +} diff --git a/test/string/mutt_str_split.c b/test/string/mutt_str_split.c new file mode 100644 index 000000000..9bd793ded --- /dev/null +++ b/test/string/mutt_str_split.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_split() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_split(void) +{ + // struct ListHead mutt_str_split(const char *src, char sep); +} diff --git a/test/string/mutt_str_startswith.c b/test/string/mutt_str_startswith.c new file mode 100644 index 000000000..7634e63af --- /dev/null +++ b/test/string/mutt_str_startswith.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_startswith() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_startswith(void) +{ + // size_t mutt_str_startswith(const char *str, const char *prefix, enum CaseSensitivity cs); +} diff --git a/test/string/mutt_str_strcasecmp.c b/test/string/mutt_str_strcasecmp.c new file mode 100644 index 000000000..9a36eca12 --- /dev/null +++ b/test/string/mutt_str_strcasecmp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strcasecmp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strcasecmp(void) +{ + // int mutt_str_strcasecmp(const char *a, const char *b); +} diff --git a/test/string/mutt_str_strcasestr.c b/test/string/mutt_str_strcasestr.c new file mode 100644 index 000000000..2dde38a6c --- /dev/null +++ b/test/string/mutt_str_strcasestr.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strcasestr() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strcasestr(void) +{ + // const char *mutt_str_strcasestr(const char *haystack, const char *needle); +} diff --git a/test/string/mutt_str_strcat.c b/test/string/mutt_str_strcat.c new file mode 100644 index 000000000..d12ee747e --- /dev/null +++ b/test/string/mutt_str_strcat.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strcat() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strcat(void) +{ + // char *mutt_str_strcat(char *buf, size_t buflen, const char *s); +} diff --git a/test/string/mutt_str_strchrnul.c b/test/string/mutt_str_strchrnul.c new file mode 100644 index 000000000..af8e7bca6 --- /dev/null +++ b/test/string/mutt_str_strchrnul.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strchrnul() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strchrnul(void) +{ + // const char *mutt_str_strchrnul(const char *s, char c); +} diff --git a/test/string/mutt_str_strcmp.c b/test/string/mutt_str_strcmp.c new file mode 100644 index 000000000..fd6ee1d46 --- /dev/null +++ b/test/string/mutt_str_strcmp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strcmp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strcmp(void) +{ + // int mutt_str_strcmp(const char *a, const char *b); +} diff --git a/test/string/mutt_str_strcoll.c b/test/string/mutt_str_strcoll.c new file mode 100644 index 000000000..827eed1dc --- /dev/null +++ b/test/string/mutt_str_strcoll.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strcoll() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strcoll(void) +{ + // int mutt_str_strcoll(const char *a, const char *b); +} diff --git a/test/string/mutt_str_strdup.c b/test/string/mutt_str_strdup.c new file mode 100644 index 000000000..4fc4c4e37 --- /dev/null +++ b/test/string/mutt_str_strdup.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strdup() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strdup(void) +{ + // char *mutt_str_strdup(const char *str); +} diff --git a/test/string/mutt_str_strfcpy.c b/test/string/mutt_str_strfcpy.c new file mode 100644 index 000000000..8d742b86f --- /dev/null +++ b/test/string/mutt_str_strfcpy.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strfcpy() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strfcpy(void) +{ + // size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize); +} diff --git a/test/string/mutt_str_stristr.c b/test/string/mutt_str_stristr.c new file mode 100644 index 000000000..9ce561d90 --- /dev/null +++ b/test/string/mutt_str_stristr.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_stristr() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_stristr(void) +{ + // const char *mutt_str_stristr(const char *haystack, const char *needle); +} diff --git a/test/string/mutt_str_strlen.c b/test/string/mutt_str_strlen.c new file mode 100644 index 000000000..3d29c993b --- /dev/null +++ b/test/string/mutt_str_strlen.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strlen() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strlen(void) +{ + // size_t mutt_str_strlen(const char *a); +} diff --git a/test/string/mutt_str_strlower.c b/test/string/mutt_str_strlower.c new file mode 100644 index 000000000..6915a876f --- /dev/null +++ b/test/string/mutt_str_strlower.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strlower() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strlower(void) +{ + // char *mutt_str_strlower(char *s); +} diff --git a/test/string/mutt_str_strncasecmp.c b/test/string/mutt_str_strncasecmp.c new file mode 100644 index 000000000..7acd1a643 --- /dev/null +++ b/test/string/mutt_str_strncasecmp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strncasecmp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strncasecmp(void) +{ + // int mutt_str_strncasecmp(const char *a, const char *b, size_t l); +} diff --git a/test/string/mutt_str_strncat.c b/test/string/mutt_str_strncat.c new file mode 100644 index 000000000..843529136 --- /dev/null +++ b/test/string/mutt_str_strncat.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strncat() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strncat(void) +{ + // char *mutt_str_strncat(char *d, size_t l, const char *s, size_t sl); +} diff --git a/test/string/mutt_str_strncmp.c b/test/string/mutt_str_strncmp.c new file mode 100644 index 000000000..ad494ba38 --- /dev/null +++ b/test/string/mutt_str_strncmp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strncmp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strncmp(void) +{ + // int mutt_str_strncmp(const char *a, const char *b, size_t l); +} diff --git a/test/string/mutt_str_strnfcpy.c b/test/string/mutt_str_strnfcpy.c new file mode 100644 index 000000000..81f19610a --- /dev/null +++ b/test/string/mutt_str_strnfcpy.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_strnfcpy() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_strnfcpy(void) +{ + // size_t mutt_str_strnfcpy(char *dest, const char *src, size_t n, size_t dsize); +} diff --git a/test/string/mutt_str_substr_cpy.c b/test/string/mutt_str_substr_cpy.c new file mode 100644 index 000000000..a325e4a30 --- /dev/null +++ b/test/string/mutt_str_substr_cpy.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_substr_cpy() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_substr_cpy(void) +{ + // char *mutt_str_substr_cpy(char *dest, const char *begin, const char *end, size_t destlen); +} diff --git a/test/string/mutt_str_substr_dup.c b/test/string/mutt_str_substr_dup.c new file mode 100644 index 000000000..5d88726ef --- /dev/null +++ b/test/string/mutt_str_substr_dup.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_substr_dup() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_substr_dup(void) +{ + // char *mutt_str_substr_dup(const char *begin, const char *end); +} diff --git a/test/string/mutt_str_sysexit.c b/test/string/mutt_str_sysexit.c new file mode 100644 index 000000000..36bc2ad58 --- /dev/null +++ b/test/string/mutt_str_sysexit.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_sysexit() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_sysexit(void) +{ + // const char *mutt_str_sysexit(int e); +} diff --git a/test/string/mutt_str_word_casecmp.c b/test/string/mutt_str_word_casecmp.c new file mode 100644 index 000000000..e2c68000f --- /dev/null +++ b/test/string/mutt_str_word_casecmp.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_str_word_casecmp() + * + * @authors + * Copyright (C) 2019 Richard Russon + * + * @copyright + * 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, see . + */ + +#define TEST_NO_MAIN +#include "acutest.h" +#include "config.h" +#include "mutt/mutt.h" + +void test_mutt_str_word_casecmp(void) +{ + // int mutt_str_word_casecmp(const char *a, const char *b); +}