[Commits] [SCM] claws branch, master, updated. 4.1.0-47-g94019c056

paul at claws-mail.org paul at claws-mail.org
Sat Jul 23 13:52:59 UTC 2022


The branch, master has been updated
       via  94019c056e89cdb1b2aeb6b8e1f502e6e95b6211 (commit)
      from  7c3fb6c33bd97c21668222c9dae10ef9b956888c (commit)

Summary of changes:
 configure.ac                               |  1 -
 src/plugins/pgpcore/Makefile.am            |  5 --
 src/plugins/pgpcore/tests/Makefile.am      | 19 -------
 src/plugins/pgpcore/tests/pgp_utils_test.c | 87 ------------------------------
 4 files changed, 112 deletions(-)
 delete mode 100644 src/plugins/pgpcore/tests/Makefile.am
 delete mode 100644 src/plugins/pgpcore/tests/pgp_utils_test.c


- Log -----------------------------------------------------------------
commit 94019c056e89cdb1b2aeb6b8e1f502e6e95b6211
Author: Paul <paul at claws-mail.org>
Date:   Sat Jul 23 14:52:51 2022 +0100

    fix bug 4547, '--enable-tests makes compilation fail'
    
    remove broken test

diff --git a/configure.ac b/configure.ac
index 06954c344..e7eba44de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2178,7 +2178,6 @@ src/plugins/python/Makefile
 src/plugins/python/examples/Makefile
 src/plugins/pgpcore/Makefile
 src/plugins/pgpcore/version.rc
-src/plugins/pgpcore/tests/Makefile
 src/plugins/pgpmime/Makefile
 src/plugins/pgpmime/version.rc
 src/plugins/pgpinline/Makefile
diff --git a/src/plugins/pgpcore/Makefile.am b/src/plugins/pgpcore/Makefile.am
index 5056758d3..897a32b1f 100644
--- a/src/plugins/pgpcore/Makefile.am
+++ b/src/plugins/pgpcore/Makefile.am
@@ -5,11 +5,6 @@
 
 include $(srcdir)/../win_plugin.mk
 
-if BUILD_TESTS
-include $(top_srcdir)/tests.mk
-SUBDIRS = . tests
-endif
-
 IFLAGS = \
 	-I$(top_builddir)/src \
 	-I$(top_builddir)/src/common \
diff --git a/src/plugins/pgpcore/tests/Makefile.am b/src/plugins/pgpcore/tests/Makefile.am
deleted file mode 100644
index c4a0e8502..000000000
--- a/src/plugins/pgpcore/tests/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-include $(top_srcdir)/tests.mk
-
-common_ldadd = \
-	$(GLIB_LIBS)
-
-AM_CPPFLAGS = \
-	$(GLIB_CFLAGS) \
-	$(GTK_CFLAGS) \
-	-I.. \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/common
-
-TEST_PROGS += pgp_utils_test
-pgp_utils_test_SOURCES = pgp_utils_test.c
-pgp_utils_test_LDADD = $(common_ldadd) ../pgpcore_la-pgp_utils.o
-
-noinst_PROGRAMS = $(TEST_PROGS)
-
-.PHONY: test
diff --git a/src/plugins/pgpcore/tests/pgp_utils_test.c b/src/plugins/pgpcore/tests/pgp_utils_test.c
deleted file mode 100644
index dbdd03b1a..000000000
--- a/src/plugins/pgpcore/tests/pgp_utils_test.c
+++ /dev/null
@@ -1,87 +0,0 @@
-#include "config.h"
-
-#include "pgp_utils.h"
-
-#define HEADER "HEADER"
-struct td {
-	gchar *input;
-	gchar *expected_output;
-};
-
-static void
-test_pgp_locate_armor_header_null()
-{
-	if (!g_test_undefined())
-		return;
-
-	if (g_test_subprocess()) {
-		gchar *out = pgp_locate_armor_header(NULL, HEADER);
-		g_assert_null(out);
-		return;
-	}
-
-	g_test_trap_subprocess(NULL, 0, 0);
-	g_test_trap_assert_stderr("*assertion*failed*");
-	g_test_trap_assert_failed();
-}
-
-static void
-test_pgp_locate_armor_header(gconstpointer user_data)
-{
-	struct td *data = (struct td *)user_data;
-	gchar *out = pgp_locate_armor_header(data->input, HEADER);
-
-	g_assert_cmpstr(out, ==, data->expected_output);
-}
-
-struct td td_justheader = {
-	"HEADER",
-	"HEADER"
-};
-
-struct td td_leading = {
-	"leadingHEADER",
-	NULL
-};
-
-struct td td_trailingspaces = {
-	"HEADER     ",
-	"HEADER     "
-};
-
-struct td td_trailingtext1 = {
-	"HEADERblah",
-	NULL
-};
-
-struct td td_trailingtext2 = {
-	"HEADER   blah",
-	NULL
-};
-
-struct td td_leadinglines = {
-	"foo\nHEADER\nbar",
-	"HEADER\nbar"
-};
-
-#define TEST(name, data) \
-	g_test_add_data_func("/plugins/pgpcore/pgp_locate_armor_header_"name, \
-			&data, \
-			test_pgp_locate_armor_header)
-int
-main (int argc, char *argv[])
-{
-	g_test_init(&argc, &argv, NULL);
-
-	g_test_add_func("/plugins/pgpcore/pgp_locate_armor_header_null",
-			test_pgp_locate_armor_header_null);
-
-	TEST("justheader", td_justheader);
-	TEST("leading", td_leading);
-	TEST("trailingspaces", td_trailingspaces);
-	TEST("trailingtext1", td_trailingtext1);
-	TEST("trailingtext2", td_trailingtext2);
-	TEST("leadinglines", td_leadinglines);
-
-	return g_test_run();
-}

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list