test/file-test
test/group-test
test/hash-test
+test/history-test
test/idna-test
test/neomutt-test
test/path-test
test/hash/mutt_hash_typed_insert.o \
test/hash/mutt_hash_walk.o
+HISTORY_OBJS = test/history/main.o \
+ test/history/mutt_hist_add.o \
+ test/history/mutt_hist_at_scratch.o \
+ test/history/mutt_hist_free.o \
+ test/history/mutt_hist_init.o \
+ test/history/mutt_hist_next.o \
+ test/history/mutt_hist_prev.o \
+ test/history/mutt_hist_read_file.o \
+ test/history/mutt_hist_reset_state.o \
+ test/history/mutt_hist_save_scratch.o \
+ test/history/mutt_hist_search.o
+
IDNA_OBJS = test/idna/main.o \
test/idna/mutt_idna_intl_to_local.o \
test/idna/mutt_idna_local_to_intl.o \
TEST_HASH = test/hash-test$(EXEEXT)
+TEST_HISTORY = test/history-test$(EXEEXT)
+
TEST_IDNA = test/idna-test$(EXEEXT)
TEST_PATH = test/path-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_FILE) $(TEST_GROUP) $(TEST_HASH) $(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_HASH) $(TEST_HISTORY) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
$(TEST_BINARY)
$(TEST_ADDRESS)
$(TEST_BASE64)
$(TEST_FILE)
$(TEST_GROUP)
$(TEST_HASH)
+ $(TEST_HISTORY)
$(TEST_IDNA)
$(TEST_PATH)
$(TEST_PATTERN)
$(TEST_HASH): $(PWD)/test/hash $(HASH_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(HASH_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+$(TEST_HISTORY): $(PWD)/test/history $(HISTORY_OBJS) $(MUTTLIBS)
+ $(CC) -o $@ $(HISTORY_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
$(TEST_IDNA): $(PWD)/test/idna $(IDNA_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(IDNA_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
$(PWD)/test/hash:
$(MKDIR_P) $(PWD)/test/hash
+$(PWD)/test/history:
+ $(MKDIR_P) $(PWD)/test/history
+
$(PWD)/test/idna:
$(MKDIR_P) $(PWD)/test/idna
$(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_FILE) $(TEST_GROUP) $(TEST_HASH) $(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_HASH) $(TEST_HISTORY) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
clean-test:
$(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
$(TEST_FILE) $(FILE_OBJS) $(FILE_OBJS:.o=.Po) \
$(TEST_GROUP) $(GROUP_OBJS) $(GROUP_OBJS:.o=.Po) \
$(TEST_HASH) $(HASH_OBJS) $(HASH_OBJS:.o=.Po) \
+ $(TEST_HISTORY) $(HISTORY_OBJS) $(HISTORY_OBJS:.o=.Po) \
$(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \
$(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \
$(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) \
HASH_DEPFILES = $(HASH_OBJS:.o=.Po)
-include $(HASH_DEPFILES)
+HISTORY_DEPFILES = $(HISTORY_OBJS:.o=.Po)
+-include $(HISTORY_DEPFILES)
+
IDNA_DEPFILES = $(IDNA_OBJS:.o=.Po)
-include $(IDNA_DEPFILES)
--- /dev/null
+/**
+ * @file
+ * Test code for history Operations
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "acutest.h"
+
+/******************************************************************************
+ * Add your test cases to this list.
+ *****************************************************************************/
+#define NEOMUTT_TEST_LIST \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_add) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_at_scratch) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_free) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_init) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_next) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_prev) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_read_file) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_reset_state) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_save_scratch) \
+ NEOMUTT_TEST_ITEM(test_mutt_hist_search)
+
+/******************************************************************************
+ * 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 }
+};
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_add()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_add(void)
+{
+ // void mutt_hist_add(enum HistoryClass hclass, const char *str, bool save);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_at_scratch()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_at_scratch(void)
+{
+ // bool mutt_hist_at_scratch(enum HistoryClass hclass);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_free()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_free(void)
+{
+ // void mutt_hist_free(void);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_init()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_init(void)
+{
+ // void mutt_hist_init(void);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_next()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_next(void)
+{
+ // char *mutt_hist_next(enum HistoryClass hclass);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_prev()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_prev(void)
+{
+ // char *mutt_hist_prev(enum HistoryClass hclass);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_read_file()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_read_file(void)
+{
+ // void mutt_hist_read_file(void);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_reset_state()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_reset_state(void)
+{
+ // void mutt_hist_reset_state(enum HistoryClass hclass);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_save_scratch()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_save_scratch(void)
+{
+ // void mutt_hist_save_scratch(enum HistoryClass hclass, const char *str);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_hist_search()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_hist_search(void)
+{
+ // int mutt_hist_search(const char *search_buf, enum HistoryClass hclass, char **matches);
+}