test/address-test
test/attach-test
test/base64-test
+test/body-test
test/buffer-test
test/charset-test
test/config-test
test/base64/mutt_b64_decode.o \
test/base64/mutt_b64_encode.o
+BODY_OBJS = test/body/main.o \
+ test/body/mutt_body_free.o \
+ test/body/mutt_body_cmp_strict.o \
+ test/body/mutt_body_new.o
+
BUFFER_OBJS = test/buffer/main.o \
test/buffer/mutt_buffer_addch.o \
test/buffer/mutt_buffer_add_printf.o \
TEST_BASE64 = test/base64-test$(EXEEXT)
+TEST_BODY = test/body-test$(EXEEXT)
+
TEST_BUFFER = test/buffer-test$(EXEEXT)
TEST_CHARSET = test/charset-test$(EXEEXT)
TEST_STRING = test/string-test$(EXEEXT)
.PHONY: test
-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_ATTACH) $(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_MBYTE) $(TEST_MD5) $(TEST_MEMORY) $(TEST_PATH) $(TEST_PATTERN) $(TEST_REGEX) $(TEST_SHA1) $(TEST_SIGNAL) $(TEST_STRING)
+test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_ATTACH) $(TEST_BASE64) $(TEST_BODY) $(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_MBYTE) $(TEST_MD5) $(TEST_MEMORY) $(TEST_PATH) $(TEST_PATTERN) $(TEST_REGEX) $(TEST_SHA1) $(TEST_SIGNAL) $(TEST_STRING)
$(TEST_BINARY)
$(TEST_ADDRESS)
$(TEST_ATTACH)
$(TEST_BASE64)
+ $(TEST_BODY)
$(TEST_BUFFER)
$(TEST_CONFIG)
$(TEST_DATE)
$(TEST_BASE64): $(PWD)/test/base64 $(BASE64_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(BASE64_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+$(TEST_BODY): $(PWD)/test/body $(BODY_OBJS) $(MUTTLIBS)
+ $(CC) -o $@ $(BODY_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
$(TEST_BUFFER): $(PWD)/test/buffer $(BUFFER_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(BUFFER_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
$(PWD)/test/base64:
$(MKDIR_P) $(PWD)/test/base64
+$(PWD)/test/body:
+ $(MKDIR_P) $(PWD)/test/body
+
$(PWD)/test/buffer:
$(MKDIR_P) $(PWD)/test/buffer
$(PWD)/test/string:
$(MKDIR_P) $(PWD)/test/string
-all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_ATTACH) $(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_MBYTE) $(TEST_MD5) $(TEST_MEMORY) $(TEST_PATH) $(TEST_PATTERN) $(TEST_REGEX) $(TEST_SHA1) $(TEST_SIGNAL) $(TEST_STRING)
+all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_ATTACH) $(TEST_BASE64) $(TEST_BODY) $(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_MBYTE) $(TEST_MD5) $(TEST_MEMORY) $(TEST_PATH) $(TEST_PATTERN) $(TEST_REGEX) $(TEST_SHA1) $(TEST_SIGNAL) $(TEST_STRING)
clean-test:
$(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
$(TEST_ADDRESS) $(ADDRESS_OBJS) $(ADDRESS_OBJS:.o=.Po) \
$(TEST_ATTACH) $(ATTACH_OBJS) $(ATTACH_OBJS:.o=.Po) \
$(TEST_BASE64) $(BASE64_OBJS) $(BASE64_OBJS:.o=.Po) \
+ $(TEST_BODY) $(BODY_OBJS) $(BODY_OBJS:.o=.Po) \
+ $(TEST_BUFFER) $(BUFFER_OBJS) $(BUFFER_OBJS:.o=.Po) \
$(TEST_CHARSET) $(CHARSET_OBJS) $(CHARSET_OBJS:.o=.Po) \
$(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
$(TEST_DATE) $(DATE_OBJS) $(DATE_OBJS:.o=.Po) \
BASE64_DEPFILES = $(BASE64_OBJS:.o=.Po)
-include $(BASE64_DEPFILES)
+BODY_DEPFILES = $(BODY_OBJS:.o=.Po)
+-include $(BODY_DEPFILES)
+
BUFFER_DEPFILES = $(BUFFER_OBJS:.o=.Po)
-include $(BUFFER_DEPFILES)
--- /dev/null
+/**
+ * @file
+ * Test code for body 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_body_cmp_strict) \
+ NEOMUTT_TEST_ITEM(test_mutt_body_free) \
+ NEOMUTT_TEST_ITEM(test_mutt_body_new)
+
+/******************************************************************************
+ * 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_body_cmp_strict()
+ *
+ * @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"
+#include "email/lib.h"
+#include "address/lib.h"
+
+void test_mutt_body_cmp_strict(void)
+{
+ // bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_body_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"
+#include "email/lib.h"
+#include "address/lib.h"
+
+void test_mutt_body_free(void)
+{
+ // void mutt_body_free(struct Body **p);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_body_new()
+ *
+ * @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"
+#include "email/lib.h"
+#include "address/lib.h"
+
+void test_mutt_body_new(void)
+{
+ // struct Body *mutt_body_new(void);
+}