neomutt
pgpewrap
test/address-test
+test/base64-test
test/config-test
test/group-test
test/idna-test
test/address/mutt_addr_write.o \
test/address/mutt_addr_write_single.o
+BASE64_OBJS = test/base64/main.o \
+ test/base64/mutt_b64_buffer_decode.o \
+ test/base64/mutt_b64_buffer_encode.o \
+ test/base64/mutt_b64_decode.o \
+ test/base64/mutt_b64_encode.o
+
CONFIG_OBJS = test/config/main.o test/config/account.o \
test/config/address.o test/config/bool.o \
test/config/command.o test/config/common.o test/config/dump.o \
TEST_ADDRESS = test/address-test$(EXEEXT)
+TEST_BASE64 = test/base64-test$(EXEEXT)
+
TEST_CONFIG = test/config-test$(EXEEXT)
TEST_GROUP = test/group-test$(EXEEXT)
TEST_STRING = test/string-test$(EXEEXT)
.PHONY: test
-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
$(TEST_BINARY)
$(TEST_ADDRESS)
+ $(TEST_BASE64)
$(TEST_CONFIG)
$(TEST_GROUP)
$(TEST_IDNA)
$(TEST_ADDRESS): $(PWD)/test/address $(ADDRESS_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(ADDRESS_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+$(TEST_BASE64): $(PWD)/test/base64 $(BASE64_OBJS) $(MUTTLIBS)
+ $(CC) -o $@ $(BASE64_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
$(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS)
$(CC) -o $@ $(CONFIG_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
$(PWD)/test/address:
$(MKDIR_P) $(PWD)/test/address
+$(PWD)/test/base64:
+ $(MKDIR_P) $(PWD)/test/base64
+
$(PWD)/test/config:
$(MKDIR_P) $(PWD)/test/config
$(PWD)/test/string:
$(MKDIR_P) $(PWD)/test/string
-all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
clean-test:
$(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
$(TEST_ADDRESS) $(ADDRESS_OBJS) $(ADDRESS_OBJS:.o=.Po) \
+ $(TEST_BASE64) $(BASE64_OBJS) $(BASE64_OBJS:.o=.Po) \
$(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
$(TEST_GROUP) $(GROUP_OBJS) $(GROUP_OBJS:.o=.Po) \
$(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \
ADDRESS_DEPFILES = $(ADDRESS_OBJS:.o=.Po)
-include $(ADDRESS_DEPFILES)
+BASE64_DEPFILES = $(BASE64_OBJS:.o=.Po)
+-include $(BASE64_DEPFILES)
+
CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po)
-include $(CONFIG_DEPFILES)
--- /dev/null
+/**
+ * @file
+ * Test code for base64 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_b64_buffer_decode) \
+ NEOMUTT_TEST_ITEM(test_mutt_b64_buffer_encode) \
+ NEOMUTT_TEST_ITEM(test_mutt_b64_decode) \
+ NEOMUTT_TEST_ITEM(test_mutt_b64_encode)
+
+/******************************************************************************
+ * 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_b64_buffer_decode()
+ *
+ * @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_b64_buffer_decode(void)
+{
+ // int mutt_b64_buffer_decode(struct Buffer *buf, const char *in);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_b64_buffer_encode()
+ *
+ * @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_b64_buffer_encode(void)
+{
+ // size_t mutt_b64_buffer_encode(struct Buffer *buf, const char *in, size_t len);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_b64_decode()
+ *
+ * @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_b64_decode(void)
+{
+ // int mutt_b64_decode(const char *in, char *out, size_t olen);
+}
--- /dev/null
+/**
+ * @file
+ * Test code for mutt_b64_encode()
+ *
+ * @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_b64_encode(void)
+{
+ // size_t mutt_b64_encode(const char *in, size_t inlen, char *out, size_t outlen);
+}