From: Richard Russon Date: Sun, 28 Apr 2019 11:37:15 +0000 (+0100) Subject: test: templates for file functions X-Git-Tag: 2019-10-25~233^2~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5338a75907b6dcd4de9c3a8c7e11cb109ca33b53;p=neomutt test: templates for file functions --- diff --git a/.gitignore b/.gitignore index 1f19509bc..5ec7b4cad 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ test/charset-test test/config-test test/date-test test/envlist-test +test/file-test test/group-test test/idna-test test/neomutt-test diff --git a/test/Makefile.autosetup b/test/Makefile.autosetup index b8df01348..ea262d921 100644 --- a/test/Makefile.autosetup +++ b/test/Makefile.autosetup @@ -118,6 +118,47 @@ ENVLIST_OBJS = test/envlist/main.o \ test/envlist/mutt_envlist_set.o \ test/envlist/mutt_envlist_unset.o +FILE_OBJS = test/file/main.o \ + test/file/mutt_file_check_empty.o \ + test/file/mutt_file_chmod_add.o \ + test/file/mutt_file_chmod_add_stat.o \ + test/file/mutt_file_chmod.o \ + test/file/mutt_file_chmod_rm.o \ + test/file/mutt_file_chmod_rm_stat.o \ + test/file/mutt_file_copy_bytes.o \ + test/file/mutt_file_copy_stream.o \ + test/file/mutt_file_decrease_mtime.o \ + test/file/mutt_file_expand_fmt.o \ + test/file/mutt_file_expand_fmt_quote.o \ + test/file/mutt_file_fclose.o \ + test/file/mutt_file_fopen.o \ + test/file/mutt_file_fsync_close.o \ + test/file/mutt_file_get_size.o \ + test/file/mutt_file_get_stat_timespec.o \ + test/file/mutt_file_iter_line.o \ + test/file/mutt_file_lock.o \ + test/file/mutt_file_map_lines.o \ + test/file/mutt_file_mkdir.o \ + test/file/mutt_file_mkstemp_full.o \ + test/file/mutt_file_open.o \ + test/file/mutt_file_quote_filename.o \ + test/file/mutt_file_read_keyword.o \ + test/file/mutt_file_read_line.o \ + test/file/mutt_file_rename.o \ + test/file/mutt_file_rmtree.o \ + test/file/mutt_file_safe_rename.o \ + test/file/mutt_file_sanitize_filename.o \ + test/file/mutt_file_sanitize_regex.o \ + test/file/mutt_file_set_mtime.o \ + test/file/mutt_file_stat_compare.o \ + test/file/mutt_file_stat_timespec_compare.o \ + test/file/mutt_file_symlink.o \ + test/file/mutt_file_timespec_compare.o \ + test/file/mutt_file_touch_atime.o \ + test/file/mutt_file_unlink.o \ + test/file/mutt_file_unlink_empty.o \ + test/file/mutt_file_unlock.o + GROUP_OBJS = test/group/main.o \ test/group/mutt_grouplist_add_addrlist.o \ test/group/mutt_grouplist_add.o \ @@ -226,6 +267,8 @@ TEST_DATE = test/date-test$(EXEEXT) TEST_ENVLIST = test/envlist-test$(EXEEXT) +TEST_FILE = test/file-test$(EXEEXT) + TEST_GROUP = test/group-test$(EXEEXT) TEST_IDNA = test/idna-test$(EXEEXT) @@ -237,7 +280,7 @@ TEST_PATTERN = test/pattern-test$(EXEEXT) TEST_STRING = test/string-test$(EXEEXT) .PHONY: test -test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_ENVLIST) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING) +test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_ENVLIST) $(TEST_FILE) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING) $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) @@ -245,6 +288,7 @@ test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSE $(TEST_CONFIG) $(TEST_DATE) $(TEST_ENVLIST) + $(TEST_FILE) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) @@ -275,6 +319,9 @@ $(TEST_DATE): $(PWD)/test/date $(DATE_OBJS) $(MUTTLIBS) $(TEST_ENVLIST): $(PWD)/test/envlist $(ENVLIST_OBJS) $(MUTTLIBS) $(CC) -o $@ $(ENVLIST_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) +$(TEST_FILE): $(PWD)/test/file $(FILE_OBJS) $(MUTTLIBS) + $(CC) -o $@ $(FILE_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) + $(TEST_GROUP): $(PWD)/test/group $(GROUP_OBJS) $(MUTTLIBS) $(CC) -o $@ $(GROUP_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS) @@ -311,6 +358,9 @@ $(PWD)/test/date: $(PWD)/test/envlist: $(MKDIR_P) $(PWD)/test/envlist +$(PWD)/test/file: + $(MKDIR_P) $(PWD)/test/file + $(PWD)/test/group: $(MKDIR_P) $(PWD)/test/group @@ -326,7 +376,7 @@ $(PWD)/test/pattern: $(PWD)/test/string: $(MKDIR_P) $(PWD)/test/string -all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_ENVLIST) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING) +all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_ENVLIST) $(TEST_FILE) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING) clean-test: $(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \ @@ -336,6 +386,7 @@ clean-test: $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \ $(TEST_DATE) $(DATE_OBJS) $(DATE_OBJS:.o=.Po) \ $(TEST_ENVLIST) $(ENVLIST_OBJS) $(ENVLIST_OBJS:.o=.Po) \ + $(TEST_FILE) $(FILE_OBJS) $(FILE_OBJS:.o=.Po) \ $(TEST_GROUP) $(GROUP_OBJS) $(GROUP_OBJS:.o=.Po) \ $(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \ $(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \ @@ -369,6 +420,9 @@ DATE_DEPFILES = $(DATE_OBJS:.o=.Po) ENVLIST_DEPFILES = $(ENVLIST_OBJS:.o=.Po) -include $(ENVLIST_DEPFILES) +FILE_DEPFILES = $(FILE_OBJS:.o=.Po) +-include $(FILE_DEPFILES) + GROUP_DEPFILES = $(GROUP_OBJS:.o=.Po) -include $(GROUP_DEPFILES) diff --git a/test/file/main.c b/test/file/main.c new file mode 100644 index 000000000..1ca8f7b43 --- /dev/null +++ b/test/file/main.c @@ -0,0 +1,81 @@ +/** + * @file + * Test code for file Operations + * + * @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 . + */ + +#include "acutest.h" + +/****************************************************************************** + * Add your test cases to this list. + *****************************************************************************/ +#define NEOMUTT_TEST_LIST \ + NEOMUTT_TEST_ITEM(test_mutt_file_check_empty) \ + NEOMUTT_TEST_ITEM(test_mutt_file_chmod_add) \ + NEOMUTT_TEST_ITEM(test_mutt_file_chmod_add_stat) \ + NEOMUTT_TEST_ITEM(test_mutt_file_chmod) \ + NEOMUTT_TEST_ITEM(test_mutt_file_chmod_rm) \ + NEOMUTT_TEST_ITEM(test_mutt_file_chmod_rm_stat) \ + NEOMUTT_TEST_ITEM(test_mutt_file_copy_bytes) \ + NEOMUTT_TEST_ITEM(test_mutt_file_copy_stream) \ + NEOMUTT_TEST_ITEM(test_mutt_file_decrease_mtime) \ + NEOMUTT_TEST_ITEM(test_mutt_file_expand_fmt) \ + NEOMUTT_TEST_ITEM(test_mutt_file_expand_fmt_quote) \ + NEOMUTT_TEST_ITEM(test_mutt_file_fclose) \ + NEOMUTT_TEST_ITEM(test_mutt_file_fopen) \ + NEOMUTT_TEST_ITEM(test_mutt_file_fsync_close) \ + NEOMUTT_TEST_ITEM(test_mutt_file_get_size) \ + NEOMUTT_TEST_ITEM(test_mutt_file_get_stat_timespec) \ + NEOMUTT_TEST_ITEM(test_mutt_file_iter_line) \ + NEOMUTT_TEST_ITEM(test_mutt_file_lock) \ + NEOMUTT_TEST_ITEM(test_mutt_file_map_lines) \ + NEOMUTT_TEST_ITEM(test_mutt_file_mkdir) \ + NEOMUTT_TEST_ITEM(test_mutt_file_mkstemp_full) \ + NEOMUTT_TEST_ITEM(test_mutt_file_open) \ + NEOMUTT_TEST_ITEM(test_mutt_file_quote_filename) \ + NEOMUTT_TEST_ITEM(test_mutt_file_read_keyword) \ + NEOMUTT_TEST_ITEM(test_mutt_file_read_line) \ + NEOMUTT_TEST_ITEM(test_mutt_file_rename) \ + NEOMUTT_TEST_ITEM(test_mutt_file_rmtree) \ + NEOMUTT_TEST_ITEM(test_mutt_file_safe_rename) \ + NEOMUTT_TEST_ITEM(test_mutt_file_sanitize_filename) \ + NEOMUTT_TEST_ITEM(test_mutt_file_sanitize_regex) \ + NEOMUTT_TEST_ITEM(test_mutt_file_set_mtime) \ + NEOMUTT_TEST_ITEM(test_mutt_file_stat_compare) \ + NEOMUTT_TEST_ITEM(test_mutt_file_stat_timespec_compare) \ + NEOMUTT_TEST_ITEM(test_mutt_file_symlink) \ + NEOMUTT_TEST_ITEM(test_mutt_file_timespec_compare) \ + NEOMUTT_TEST_ITEM(test_mutt_file_touch_atime) \ + NEOMUTT_TEST_ITEM(test_mutt_file_unlink) \ + NEOMUTT_TEST_ITEM(test_mutt_file_unlink_empty) \ + NEOMUTT_TEST_ITEM(test_mutt_file_unlock) + +/****************************************************************************** + * 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/file/mutt_file_check_empty.c b/test/file/mutt_file_check_empty.c new file mode 100644 index 000000000..6f23ff4d7 --- /dev/null +++ b/test/file/mutt_file_check_empty.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_check_empty() + * + * @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_file_check_empty(void) +{ + // int mutt_file_check_empty(const char *path); +} diff --git a/test/file/mutt_file_chmod.c b/test/file/mutt_file_chmod.c new file mode 100644 index 000000000..aefde7e9f --- /dev/null +++ b/test/file/mutt_file_chmod.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_chmod() + * + * @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_file_chmod(void) +{ + // int mutt_file_chmod(const char *path, mode_t mode); +} diff --git a/test/file/mutt_file_chmod_add.c b/test/file/mutt_file_chmod_add.c new file mode 100644 index 000000000..0dbfda710 --- /dev/null +++ b/test/file/mutt_file_chmod_add.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_chmod_add() + * + * @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_file_chmod_add(void) +{ + // int mutt_file_chmod_add(const char *path, mode_t mode); +} diff --git a/test/file/mutt_file_chmod_add_stat.c b/test/file/mutt_file_chmod_add_stat.c new file mode 100644 index 000000000..a1cebc906 --- /dev/null +++ b/test/file/mutt_file_chmod_add_stat.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_chmod_add_stat() + * + * @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_file_chmod_add_stat(void) +{ + // int mutt_file_chmod_add_stat(const char *path, mode_t mode, struct stat *st); +} diff --git a/test/file/mutt_file_chmod_rm.c b/test/file/mutt_file_chmod_rm.c new file mode 100644 index 000000000..61ea9c7a4 --- /dev/null +++ b/test/file/mutt_file_chmod_rm.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_chmod_rm() + * + * @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_file_chmod_rm(void) +{ + // int mutt_file_chmod_rm(const char *path, mode_t mode); +} diff --git a/test/file/mutt_file_chmod_rm_stat.c b/test/file/mutt_file_chmod_rm_stat.c new file mode 100644 index 000000000..84183969f --- /dev/null +++ b/test/file/mutt_file_chmod_rm_stat.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_chmod_rm_stat() + * + * @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_file_chmod_rm_stat(void) +{ + // int mutt_file_chmod_rm_stat(const char *path, mode_t mode, struct stat *st); +} diff --git a/test/file/mutt_file_copy_bytes.c b/test/file/mutt_file_copy_bytes.c new file mode 100644 index 000000000..2426e3166 --- /dev/null +++ b/test/file/mutt_file_copy_bytes.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_copy_bytes() + * + * @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_file_copy_bytes(void) +{ + // int mutt_file_copy_bytes(FILE *fp_in, FILE *fp_out, size_t size); +} diff --git a/test/file/mutt_file_copy_stream.c b/test/file/mutt_file_copy_stream.c new file mode 100644 index 000000000..d75fee9b4 --- /dev/null +++ b/test/file/mutt_file_copy_stream.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_copy_stream() + * + * @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_file_copy_stream(void) +{ + // int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out); +} diff --git a/test/file/mutt_file_decrease_mtime.c b/test/file/mutt_file_decrease_mtime.c new file mode 100644 index 000000000..07a538937 --- /dev/null +++ b/test/file/mutt_file_decrease_mtime.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_decrease_mtime() + * + * @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_file_decrease_mtime(void) +{ + // time_t mutt_file_decrease_mtime(const char *fp, struct stat *st); +} diff --git a/test/file/mutt_file_expand_fmt.c b/test/file/mutt_file_expand_fmt.c new file mode 100644 index 000000000..90671fcf2 --- /dev/null +++ b/test/file/mutt_file_expand_fmt.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_expand_fmt() + * + * @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_file_expand_fmt(void) +{ + // void mutt_file_expand_fmt(char *dest, size_t destlen, const char *fmt, const char *src); +} diff --git a/test/file/mutt_file_expand_fmt_quote.c b/test/file/mutt_file_expand_fmt_quote.c new file mode 100644 index 000000000..c6354b070 --- /dev/null +++ b/test/file/mutt_file_expand_fmt_quote.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_expand_fmt_quote() + * + * @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_file_expand_fmt_quote(void) +{ + // void mutt_file_expand_fmt_quote(char *dest, size_t destlen, const char *fmt, const char *src); +} diff --git a/test/file/mutt_file_fclose.c b/test/file/mutt_file_fclose.c new file mode 100644 index 000000000..61484be99 --- /dev/null +++ b/test/file/mutt_file_fclose.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_fclose() + * + * @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_file_fclose(void) +{ + // int mutt_file_fclose(FILE **fp); +} diff --git a/test/file/mutt_file_fopen.c b/test/file/mutt_file_fopen.c new file mode 100644 index 000000000..68de754b6 --- /dev/null +++ b/test/file/mutt_file_fopen.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_fopen() + * + * @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_file_fopen(void) +{ + // FILE *mutt_file_fopen(const char *path, const char *mode); +} diff --git a/test/file/mutt_file_fsync_close.c b/test/file/mutt_file_fsync_close.c new file mode 100644 index 000000000..2025ca55c --- /dev/null +++ b/test/file/mutt_file_fsync_close.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_fsync_close() + * + * @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_file_fsync_close(void) +{ + // int mutt_file_fsync_close(FILE **fp); +} diff --git a/test/file/mutt_file_get_size.c b/test/file/mutt_file_get_size.c new file mode 100644 index 000000000..63899778f --- /dev/null +++ b/test/file/mutt_file_get_size.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_get_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_file_get_size(void) +{ + // long mutt_file_get_size(const char *path); +} diff --git a/test/file/mutt_file_get_stat_timespec.c b/test/file/mutt_file_get_stat_timespec.c new file mode 100644 index 000000000..d32d1ae24 --- /dev/null +++ b/test/file/mutt_file_get_stat_timespec.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_get_stat_timespec() + * + * @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_file_get_stat_timespec(void) +{ + // void mutt_file_get_stat_timespec(struct timespec *dest, struct stat *sb, enum MuttStatType type); +} diff --git a/test/file/mutt_file_iter_line.c b/test/file/mutt_file_iter_line.c new file mode 100644 index 000000000..1149c6035 --- /dev/null +++ b/test/file/mutt_file_iter_line.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_iter_line() + * + * @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_file_iter_line(void) +{ + // bool mutt_file_iter_line(struct MuttFileIter *iter, FILE *fp, int flags); +} diff --git a/test/file/mutt_file_lock.c b/test/file/mutt_file_lock.c new file mode 100644 index 000000000..012c2fced --- /dev/null +++ b/test/file/mutt_file_lock.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_lock() + * + * @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_file_lock(void) +{ + // int mutt_file_lock(int fd, bool excl, bool timeout); +} diff --git a/test/file/mutt_file_map_lines.c b/test/file/mutt_file_map_lines.c new file mode 100644 index 000000000..b67586eb0 --- /dev/null +++ b/test/file/mutt_file_map_lines.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_map_lines() + * + * @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_file_map_lines(void) +{ + // bool mutt_file_map_lines(mutt_file_map_t func, void *user_data, FILE *fp, int flags); +} diff --git a/test/file/mutt_file_mkdir.c b/test/file/mutt_file_mkdir.c new file mode 100644 index 000000000..e8b3f7aac --- /dev/null +++ b/test/file/mutt_file_mkdir.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_mkdir() + * + * @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_file_mkdir(void) +{ + // int mutt_file_mkdir(const char *path, mode_t mode); +} diff --git a/test/file/mutt_file_mkstemp_full.c b/test/file/mutt_file_mkstemp_full.c new file mode 100644 index 000000000..81a36cd33 --- /dev/null +++ b/test/file/mutt_file_mkstemp_full.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_mkstemp_full() + * + * @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_file_mkstemp_full(void) +{ + // FILE *mutt_file_mkstemp_full(const char *file, int line, const char *func); +} diff --git a/test/file/mutt_file_open.c b/test/file/mutt_file_open.c new file mode 100644 index 000000000..6c015506d --- /dev/null +++ b/test/file/mutt_file_open.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_open() + * + * @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_file_open(void) +{ + // int mutt_file_open(const char *path, int flags); +} diff --git a/test/file/mutt_file_quote_filename.c b/test/file/mutt_file_quote_filename.c new file mode 100644 index 000000000..2e7114d00 --- /dev/null +++ b/test/file/mutt_file_quote_filename.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_quote_filename() + * + * @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_file_quote_filename(void) +{ + // size_t mutt_file_quote_filename(const char *filename, char *buf, size_t buflen); +} diff --git a/test/file/mutt_file_read_keyword.c b/test/file/mutt_file_read_keyword.c new file mode 100644 index 000000000..fb73152df --- /dev/null +++ b/test/file/mutt_file_read_keyword.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_read_keyword() + * + * @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_file_read_keyword(void) +{ + // char *mutt_file_read_keyword(const char *file, char *buf, size_t buflen); +} diff --git a/test/file/mutt_file_read_line.c b/test/file/mutt_file_read_line.c new file mode 100644 index 000000000..a2a431fc4 --- /dev/null +++ b/test/file/mutt_file_read_line.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_read_line() + * + * @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_file_read_line(void) +{ + // char *mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, int flags); +} diff --git a/test/file/mutt_file_rename.c b/test/file/mutt_file_rename.c new file mode 100644 index 000000000..febbbbf36 --- /dev/null +++ b/test/file/mutt_file_rename.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_rename() + * + * @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_file_rename(void) +{ + // int mutt_file_rename(const char *oldfile, const char *newfile); +} diff --git a/test/file/mutt_file_rmtree.c b/test/file/mutt_file_rmtree.c new file mode 100644 index 000000000..0252de09f --- /dev/null +++ b/test/file/mutt_file_rmtree.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_rmtree() + * + * @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_file_rmtree(void) +{ + // int mutt_file_rmtree(const char *path); +} diff --git a/test/file/mutt_file_safe_rename.c b/test/file/mutt_file_safe_rename.c new file mode 100644 index 000000000..c3b76e279 --- /dev/null +++ b/test/file/mutt_file_safe_rename.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_safe_rename() + * + * @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_file_safe_rename(void) +{ + // int mutt_file_safe_rename(const char *src, const char *target); +} diff --git a/test/file/mutt_file_sanitize_filename.c b/test/file/mutt_file_sanitize_filename.c new file mode 100644 index 000000000..5e6592928 --- /dev/null +++ b/test/file/mutt_file_sanitize_filename.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_sanitize_filename() + * + * @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_file_sanitize_filename(void) +{ + // void mutt_file_sanitize_filename(char *fp, bool slash); +} diff --git a/test/file/mutt_file_sanitize_regex.c b/test/file/mutt_file_sanitize_regex.c new file mode 100644 index 000000000..41a22832a --- /dev/null +++ b/test/file/mutt_file_sanitize_regex.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_sanitize_regex() + * + * @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_file_sanitize_regex(void) +{ + // int mutt_file_sanitize_regex(struct Buffer *dest, const char *src); +} diff --git a/test/file/mutt_file_set_mtime.c b/test/file/mutt_file_set_mtime.c new file mode 100644 index 000000000..9f8315d59 --- /dev/null +++ b/test/file/mutt_file_set_mtime.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_set_mtime() + * + * @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_file_set_mtime(void) +{ + // void mutt_file_set_mtime(const char *from, const char *to); +} diff --git a/test/file/mutt_file_stat_compare.c b/test/file/mutt_file_stat_compare.c new file mode 100644 index 000000000..1e5a87916 --- /dev/null +++ b/test/file/mutt_file_stat_compare.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_stat_compare() + * + * @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_file_stat_compare(void) +{ + // int mutt_file_stat_compare(struct stat *sba, enum MuttStatType sba_type, struct stat *sbb, enum MuttStatType sbb_type); +} diff --git a/test/file/mutt_file_stat_timespec_compare.c b/test/file/mutt_file_stat_timespec_compare.c new file mode 100644 index 000000000..2d94daab2 --- /dev/null +++ b/test/file/mutt_file_stat_timespec_compare.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_stat_timespec_compare() + * + * @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_file_stat_timespec_compare(void) +{ + // int mutt_file_stat_timespec_compare(struct stat *sba, enum MuttStatType type, struct timespec *b); +} diff --git a/test/file/mutt_file_symlink.c b/test/file/mutt_file_symlink.c new file mode 100644 index 000000000..aa36ce268 --- /dev/null +++ b/test/file/mutt_file_symlink.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_symlink() + * + * @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_file_symlink(void) +{ + // int mutt_file_symlink(const char *oldpath, const char *newpath); +} diff --git a/test/file/mutt_file_timespec_compare.c b/test/file/mutt_file_timespec_compare.c new file mode 100644 index 000000000..0bf7b4078 --- /dev/null +++ b/test/file/mutt_file_timespec_compare.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_timespec_compare() + * + * @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_file_timespec_compare(void) +{ + // int mutt_file_timespec_compare(struct timespec *a, struct timespec *b); +} diff --git a/test/file/mutt_file_touch_atime.c b/test/file/mutt_file_touch_atime.c new file mode 100644 index 000000000..fe6968fd4 --- /dev/null +++ b/test/file/mutt_file_touch_atime.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_touch_atime() + * + * @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_file_touch_atime(void) +{ + // void mutt_file_touch_atime(int fd); +} diff --git a/test/file/mutt_file_unlink.c b/test/file/mutt_file_unlink.c new file mode 100644 index 000000000..44f380dc4 --- /dev/null +++ b/test/file/mutt_file_unlink.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_unlink() + * + * @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_file_unlink(void) +{ + // void mutt_file_unlink(const char *s); +} diff --git a/test/file/mutt_file_unlink_empty.c b/test/file/mutt_file_unlink_empty.c new file mode 100644 index 000000000..b115ee1c7 --- /dev/null +++ b/test/file/mutt_file_unlink_empty.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_unlink_empty() + * + * @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_file_unlink_empty(void) +{ + // void mutt_file_unlink_empty(const char *path); +} diff --git a/test/file/mutt_file_unlock.c b/test/file/mutt_file_unlock.c new file mode 100644 index 000000000..ec6af00b7 --- /dev/null +++ b/test/file/mutt_file_unlock.c @@ -0,0 +1,31 @@ +/** + * @file + * Test code for mutt_file_unlock() + * + * @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_file_unlock(void) +{ + // int mutt_file_unlock(int fd); +}