test/idna-test
test/list-test
test/logging-test
+test/mapping-test
test/neomutt-test
test/path-test
test/pattern-test
test/logging/log_queue_save.o \
test/logging/log_queue_set_max_size.o
+MAPPING_OBJS = test/mapping/main.o \
+ test/mapping/mutt_map_get_name.o \
+ test/mapping/mutt_map_get_value.o
+
PATH_OBJS = test/path/main.o \
test/path/mutt_path_abbr_folder.o \
test/path/mutt_path_basename.o \
TEST_LOGGING = test/logging-test$(EXEEXT)
+TEST_MAPPING = test/mapping-test$(EXEEXT)
+
TEST_PATH = test/path-test$(EXEEXT)
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_FILE) $(TEST_GROUP) $(TEST_HASH) $(TEST_HISTORY) $(TEST_IDNA) $(TEST_LIST) $(TEST_LOGGING) $(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_LIST) $(TEST_LOGGING) $(TEST_MAPPING) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
$(TEST_BINARY)
$(TEST_ADDRESS)
$(TEST_BASE64)
$(TEST_IDNA)
$(TEST_LIST)
$(TEST_LOGGING)
+ $(TEST_MAPPING)
$(TEST_PATH)
$(TEST_PATTERN)
$(TEST_STRING)
$(TEST_LOGGING): $(PWD)/test/logging $(LOGGING_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(LOGGING_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+$(TEST_MAPPING): $(PWD)/test/mapping $(MAPPING_OBJS) $(MUTTLIBS)
+ $(CC) -o $@ $(MAPPING_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
$(TEST_PATH): $(PWD)/test/path $(PATH_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(PATH_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
$(PWD)/test/logging:
$(MKDIR_P) $(PWD)/test/logging
+$(PWD)/test/mapping:
+ $(MKDIR_P) $(PWD)/test/mapping
+
$(PWD)/test/path:
$(MKDIR_P) $(PWD)/test/path
$(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_HISTORY) $(TEST_IDNA) $(TEST_LIST) $(TEST_LOGGING) $(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_LIST) $(TEST_LOGGING) $(TEST_MAPPING) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
clean-test:
$(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
$(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \
$(TEST_LIST) $(LIST_OBJS) $(LIST_OBJS:.o=.Po) \
$(TEST_LOGGING) $(LOGGING_OBJS) $(LOGGING_OBJS:.o=.Po) \
+ $(TEST_MAPPING) $(MAPPING_OBJS) $(MAPPING_OBJS:.o=.Po) \
$(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \
$(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) \
$(TEST_STRING) $(STRING_OBJS) $(STRING_OBJS:.o=.Po)
LOGGING_DEPFILES = $(LOGGING_OBJS:.o=.Po)
-include $(LOGGING_DEPFILES)
+MAPPING_DEPFILES = $(MAPPING_OBJS:.o=.Po)
+-include $(MAPPING_DEPFILES)
+
PATH_DEPFILES = $(PATH_OBJS:.o=.Po)
-include $(PATH_DEPFILES)
--- /dev/null
+/**
+ * @file
+ * Test code for mapping 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_map_get_name) \
+ NEOMUTT_TEST_ITEM(test_mutt_map_get_value)
+
+/******************************************************************************
+ * 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_map_get_name()
+ *
+ * @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_map_get_name(void)
+{
+ // const char *mutt_map_get_name(int val, const struct Mapping *map);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_map_get_value()
+ *
+ * @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_map_get_value(void)
+{
+ // int mutt_map_get_value(const char *name, const struct Mapping *map);
+}