]> granicus.if.org Git - neomutt/commitdiff
test: tidy/clang-format
authorRichard Russon <rich@flatcap.org>
Sat, 28 Jul 2018 21:03:38 +0000 (22:03 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 28 Jul 2018 22:53:18 +0000 (23:53 +0100)
19 files changed:
test/config/account.c
test/config/address.c
test/config/bool.c
test/config/command.c
test/config/common.c
test/config/common.h
test/config/initial.c
test/config/long.c
test/config/magic.c
test/config/main.c
test/config/mbtable.c
test/config/number.c
test/config/path.c
test/config/quad.c
test/config/regex.c
test/config/set.c
test/config/sort.c
test/config/string.c
test/config/synonym.c

index c562458d76245f77c88c276f879f140341edf3eb..24ca064a5a661e6a874e565209b0271e6e112c20 100644 (file)
 #include "config.h"
 #include <stdbool.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/hash.h"
-#include "mutt/logging.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/inheritance.h"
-#include "config/number.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static short VarApple;
 static short VarBanana;
@@ -57,7 +50,8 @@ static struct ConfigDef Vars[] = {
  * @param var_names List of config items (NULL terminated)
  * @retval ptr New Account object
  */
-struct Account *ac_create(const struct ConfigSet *cs, const char *name, const char *var_names[])
+struct Account *ac_create(const struct ConfigSet *cs, const char *name,
+                          const char *var_names[])
 {
   if (!cs || !name || !var_names)
     return NULL; /* LCOV_EXCL_LINE */
@@ -201,7 +195,8 @@ void config_account(void)
 
   const char *account = "damaged";
   const char *BrokenVarStr[] = {
-    "Pineapple", NULL,
+    "Pineapple",
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, BrokenVarStr);
@@ -217,7 +212,9 @@ void config_account(void)
   }
 
   const char *AccountVarStr2[] = {
-    "Apple", "Apple", NULL,
+    "Apple",
+    "Apple",
+    NULL,
   };
 
   TEST_MSG("Expect error for next test\n");
@@ -231,7 +228,9 @@ void config_account(void)
 
   account = "fruit";
   const char *AccountVarStr[] = {
-    "Apple", "Cherry", NULL,
+    "Apple",
+    "Cherry",
+    NULL,
   };
 
   ac = ac_create(cs, account, AccountVarStr);
index 195ff0c16f62f075f896844e84a062fbfd74f95d..51175e3838486e814240998853abf08c1603da68 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
-#include "config/address.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 #include "email/address.h"
 
 static struct Address *VarApple;
@@ -547,7 +543,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarAddr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarAddr);
index 54ae348f56f6ab3583ada4007245a93561db82d2..ed051a9515cce331d25bbd50f71d8040aa2fa634 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
-#include "config/bool.h"
 #include "config/common.h"
-#include "config/quad.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static bool VarApple;
 static bool VarBanana;
@@ -172,7 +167,10 @@ static bool test_string_set(struct ConfigSet *cs, struct Buffer *err)
     "no", "yes", "n", "y", "false", "true", "0", "1", "off", "on",
   };
   const char *invalid[] = {
-    "nope", "ye", "", NULL,
+    "nope",
+    "ye",
+    "",
+    NULL,
   };
   char *name = "Damson";
 
@@ -524,7 +522,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 4e480504a6c7161dbd64cfb9205b437df87d8f05..45431c37de0b4d61f1475e3921c24ac060246b31 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
-#include "config/command.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char *VarApple;
 static char *VarBanana;
@@ -574,7 +570,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 9131b19e7bad9915caf4b1dfb3dff974c9296842..9aa5617e289444adac585b82b1b784e0663ea711 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "mutt/buffer.h"
-#include "mutt/hash.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
-#include "config/inheritance.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "mutt/mutt.h"
+#include "config/lib.h"
 #include "common.h"
 
 const char *line = "----------------------------------------"
@@ -42,7 +37,8 @@ const char *line = "----------------------------------------"
 
 bool dont_fail = false;
 
-int validator_fail(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *result)
+int validator_fail(const struct ConfigSet *cs, const struct ConfigDef *cdef,
+                   intptr_t value, struct Buffer *result)
 {
   if (dont_fail)
     return CSR_SUCCESS;
@@ -54,7 +50,8 @@ int validator_fail(const struct ConfigSet *cs, const struct ConfigDef *cdef, int
   return CSR_ERR_INVALID;
 }
 
-int validator_warn(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *result)
+int validator_warn(const struct ConfigSet *cs, const struct ConfigDef *cdef,
+                   intptr_t value, struct Buffer *result)
 {
   if (value > 1000000)
     mutt_buffer_printf(result, "%s: %s, (ptr)", __func__, cdef->name);
@@ -63,7 +60,8 @@ int validator_warn(const struct ConfigSet *cs, const struct ConfigDef *cdef, int
   return CSR_SUCCESS | CSR_SUC_WARNING;
 }
 
-int validator_succeed(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *result)
+int validator_succeed(const struct ConfigSet *cs, const struct ConfigDef *cdef,
+                      intptr_t value, struct Buffer *result)
 {
   if (value > 1000000)
     mutt_buffer_printf(result, "%s: %s, (ptr)", __func__, cdef->name);
@@ -83,7 +81,8 @@ void short_line(void)
   TEST_MSG("%s\n", line + 40);
 }
 
-bool log_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev)
+bool log_listener(const struct ConfigSet *cs, struct HashElem *he,
+                  const char *name, enum ConfigEvent ev)
 {
   struct Buffer result;
   mutt_buffer_init(&result);
@@ -186,4 +185,3 @@ void cs_dump_set(const struct ConfigSet *cs)
 
   FREE(&result.data);
 }
-
index 827a7a769347c179ef413f558da93c14fb62bc87..21029e93bedd434df5c74f87ed578597f9e35eea 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
-#include "config/set.h"
+#include "config/lib.h"
 
 struct Buffer;
 struct Hash;
index dc0949def02712fcecfe19331bcea90211cd534b..f43cbf1f71548068f10c69c43574d6ed169b16ed 100644 (file)
 #include "config.h"
 #include <stdbool.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/string3.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char *VarApple;
 static char *VarBanana;
index 460675bb9d5c605d3ef478d77f93e174f5fc11ed..a859f18a505c15da68cdd1e0fb26ec7dc1dd3551 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/long.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static long VarApple;
 static long VarBanana;
@@ -76,8 +72,8 @@ static struct ConfigDef Vars[] = {
 static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 {
   log_line(__func__);
-  TEST_MSG("Apple = %d\n", VarApple);
-  TEST_MSG("Banana = %d\n", VarBanana);
+  TEST_MSG("Apple = %ld\n", VarApple);
+  TEST_MSG("Banana = %ld\n", VarBanana);
 
   if (!TEST_CHECK(VarApple == -42))
   {
@@ -116,7 +112,7 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
     FREE(&value.data);
     return false;
   }
-  TEST_MSG("Apple = %d\n", VarApple);
+  TEST_MSG("Apple = %ld\n", VarApple);
   TEST_MSG("Apple's initial value is '%s'\n", value.data);
 
   mutt_buffer_reset(&value);
@@ -134,7 +130,7 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
     FREE(&value.data);
     return false;
   }
-  TEST_MSG("Banana = %d\n", VarBanana);
+  TEST_MSG("Banana = %ld\n", VarBanana);
   TEST_MSG("Banana's initial value is '%s'\n", NONULL(value.data));
 
   mutt_buffer_reset(&value);
@@ -155,7 +151,7 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
     return false;
   }
 
-  TEST_MSG("Cherry = %d\n", VarCherry);
+  TEST_MSG("Cherry = %ld\n", VarCherry);
   TEST_MSG("Cherry's initial value is %s\n", value.data);
 
   FREE(&value.data);
@@ -198,7 +194,7 @@ static bool test_string_set(struct ConfigSet *cs, struct Buffer *err)
       TEST_MSG("Value of %s wasn't changed\n", name);
       return false;
     }
-    TEST_MSG("%s = %d, set by '%s'\n", name, VarDamson, valid[i]);
+    TEST_MSG("%s = %ld, set by '%s'\n", name, VarDamson, valid[i]);
     short_line();
   }
 
@@ -251,7 +247,7 @@ static bool test_string_get(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("Get failed: %s\n", err->data);
     return false;
   }
-  TEST_MSG("%s = %d, %s\n", name, VarFig, err->data);
+  TEST_MSG("%s = %ld, %s\n", name, VarFig, err->data);
 
   VarFig = -789;
   mutt_buffer_reset(err);
@@ -261,7 +257,7 @@ static bool test_string_get(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("Get failed: %s\n", err->data);
     return false;
   }
-  TEST_MSG("%s = %d, %s\n", name, VarFig, err->data);
+  TEST_MSG("%s = %ld, %s\n", name, VarFig, err->data);
 
   log_line(__func__);
   return true;
@@ -289,7 +285,7 @@ static bool test_native_set(struct ConfigSet *cs, struct Buffer *err)
     return false;
   }
 
-  TEST_MSG("%s = %d, set to '%d'\n", name, VarGuava, value);
+  TEST_MSG("%s = %ld, set to '%ld'\n", name, VarGuava, value);
 
   short_line();
   TEST_MSG("Setting %s to %d\n", name, value);
@@ -364,7 +360,7 @@ static bool test_reset(struct ConfigSet *cs, struct Buffer *err)
     return false;
   }
 
-  TEST_MSG("Reset: %s = %d\n", name, VarJackfruit);
+  TEST_MSG("Reset: %s = %ld\n", name, VarJackfruit);
 
   short_line();
   name = "Kumquat";
@@ -375,7 +371,7 @@ static bool test_reset(struct ConfigSet *cs, struct Buffer *err)
   rc = cs_str_string_set(cs, name, "99", err);
   if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
     return false;
-  TEST_MSG("Set: %s = %d\n", name, VarKumquat);
+  TEST_MSG("Set: %s = %ld\n", name, VarKumquat);
   dont_fail = false;
 
   rc = cs_str_reset(cs, name, err);
@@ -395,7 +391,7 @@ static bool test_reset(struct ConfigSet *cs, struct Buffer *err)
     return false;
   }
 
-  TEST_MSG("Reset: %s = %d\n", name, VarKumquat);
+  TEST_MSG("Reset: %s = %ld\n", name, VarKumquat);
 
   log_line(__func__);
   return true;
@@ -418,7 +414,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("String: %s = %d\n", name, VarLemon);
+  TEST_MSG("String: %s = %ld\n", name, VarLemon);
   short_line();
 
   VarLemon = 456;
@@ -433,7 +429,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("Native: %s = %d\n", name, VarLemon);
+  TEST_MSG("Native: %s = %ld\n", name, VarLemon);
   short_line();
 
   name = "Mango";
@@ -449,7 +445,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("String: %s = %d\n", name, VarMango);
+  TEST_MSG("String: %s = %ld\n", name, VarMango);
   short_line();
 
   VarMango = 456;
@@ -464,7 +460,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("Native: %s = %d\n", name, VarMango);
+  TEST_MSG("Native: %s = %ld\n", name, VarMango);
   short_line();
 
   name = "Nectarine";
@@ -480,7 +476,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("String: %s = %d\n", name, VarNectarine);
+  TEST_MSG("String: %s = %ld\n", name, VarNectarine);
   short_line();
 
   VarNectarine = 456;
@@ -495,7 +491,7 @@ static bool test_validator(struct ConfigSet *cs, struct Buffer *err)
     TEST_MSG("%s\n", err->data);
     return false;
   }
-  TEST_MSG("Native: %s = %d\n", name, VarNectarine);
+  TEST_MSG("Native: %s = %ld\n", name, VarNectarine);
 
   log_line(__func__);
   return true;
@@ -521,7 +517,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 99657020d74bca3631c835e19061ebe7d0852c21..0f5a45b192e3d6df7467e1f494180ed752a7b5df 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/magic.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static short VarApple;
 static short VarBanana;
@@ -197,8 +193,8 @@ static bool test_string_set(struct ConfigSet *cs, struct Buffer *err)
   }
   else
   {
-      TEST_MSG("This test should have failed\n");
-      return false;
+    TEST_MSG("This test should have failed\n");
+    return false;
   }
 
   for (unsigned int i = 0; i < mutt_array_size(invalid); i++)
@@ -287,8 +283,8 @@ static bool test_native_set(struct ConfigSet *cs, struct Buffer *err)
   }
   else
   {
-      TEST_MSG("This test should have failed\n");
-      return false;
+    TEST_MSG("This test should have failed\n");
+    return false;
   }
 
   int invalid[] = { 0, 5 };
@@ -512,7 +508,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 008f1daf580bca2e62f7a058015e44eaff25fcbb..49676336d98ce2679cdb02fcb7cc406b2ca99138 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include "mutt/logging.h"
+#include "mutt/mutt.h"
 #include "test/config/account2.h"
 #include "test/config/address.h"
 #include "test/config/bool.h"
index c33224bb6a3f127d7207616900f0ab9885646328..e1bd84804ded19e17cddd21185ac9c5aaa2d4265 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/mbtable.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static struct MbTable *VarApple;
 static struct MbTable *VarBanana;
@@ -563,7 +559,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarMb[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarMb);
@@ -608,10 +605,10 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   }
   dump_native(cs, parent, child);
 
+  log_line(__func__);
   result = true;
 ti_out:
   ac_free(cs, &ac);
-  log_line(__func__);
   return result;
 }
 
index fdc8e7edc31fd59ec29da8a4075efdd0faa2d6db..d593f17c71563208d2a9e6c26f42d196bda73294 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/number.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static short VarApple;
 static short VarBanana;
@@ -540,7 +536,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 42403291b29a89a9cb323f962d8bfb46487ca469..8c3313c29840dbbe6223272d7b34d8378cec65bd 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/path.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char *VarApple;
 static char *VarBanana;
@@ -574,7 +570,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index 8b0b6942ab612b0eb25599bc6be21cf5328daf33..3f6a41e37a05972bfdb5c84f2d39c7cf48011e3b 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
-#include "config/bool.h"
 #include "config/common.h"
-#include "config/quad.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char VarApple;
 static char VarBanana;
@@ -170,7 +165,10 @@ static bool test_string_set(struct ConfigSet *cs, struct Buffer *err)
 
   const char *valid[] = { "no", "yes", "ask-no", "ask-yes" };
   const char *invalid[] = {
-    "nope", "ye", "", NULL,
+    "nope",
+    "ye",
+    "",
+    NULL,
   };
   char *name = "Damson";
 
@@ -531,7 +529,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
@@ -601,7 +600,10 @@ static bool test_toggle(struct ConfigSet *cs, struct Buffer *err)
   };
 
   struct ToggleTest tests[] = {
-    { MUTT_NO, MUTT_YES }, { MUTT_YES, MUTT_NO }, { MUTT_ASKNO, MUTT_ASKYES }, { MUTT_ASKYES, MUTT_ASKNO },
+    { MUTT_NO, MUTT_YES },
+    { MUTT_YES, MUTT_NO },
+    { MUTT_ASKNO, MUTT_ASKYES },
+    { MUTT_ASKYES, MUTT_ASKNO },
   };
 
   char *name = "Nectarine";
index 80fec2f1687f03fa6d213ec19d64a11c5d1e5fd9..4c147d94c145dc94f7c45af3ecad6c78598f5aa1 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/regex3.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/regex2.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static struct Regex *VarApple;
 static struct Regex *VarBanana;
@@ -614,7 +609,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarRegex[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarRegex);
index 655b3e39b7dae8c1e6b9a2b55f3358b568e9d2a7..91f123a1d2cfb8c85f30e7f988db662d29163a5c 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
-#include "config/bool.h"
+#include "mutt/mutt.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static short VarApple;
 static bool VarBanana;
@@ -46,27 +42,32 @@ static struct ConfigDef Vars[] = {
 };
 // clang-format on
 
-static int dummy_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
+static int dummy_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef,
+                            const char *value, struct Buffer *err)
 {
   return CSR_ERR_CODE;
 }
 
-static int dummy_string_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
+static int dummy_string_get(const struct ConfigSet *cs, void *var,
+                            const struct ConfigDef *cdef, struct Buffer *result)
 {
   return CSR_ERR_CODE;
 }
 
-static int dummy_native_set(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
+static int dummy_native_set(const struct ConfigSet *cs, void *var,
+                            const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 {
   return CSR_ERR_CODE;
 }
 
-static intptr_t dummy_native_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
+static intptr_t dummy_native_get(const struct ConfigSet *cs, void *var,
+                                 const struct ConfigDef *cdef, struct Buffer *err)
 {
   return INT_MIN;
 }
 
-static int dummy_reset(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
+static int dummy_reset(const struct ConfigSet *cs, void *var,
+                       const struct ConfigDef *cdef, struct Buffer *err)
 {
   return CSR_ERR_CODE;
 }
index ba0844b33358a1e92129f95440750ca8d4a7e945..ea40e852ea1f682d321d4cd6c95a6847b4df638a 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/mapping.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/sort.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static short VarApple;
 static short VarBanana;
@@ -227,7 +222,10 @@ static bool test_string_set(struct ConfigSet *cs, struct Buffer *err)
     }
 
     const char *invalid[] = {
-      "-1", "999", "junk", NULL,
+      "-1",
+      "999",
+      "junk",
+      NULL,
     };
 
     for (unsigned int j = 0; j < mutt_array_size(invalid); j++)
@@ -635,7 +633,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index c975923ab484ad55bc00f5c86b4e1c66452d90de..98a6512ffeef26a3d628068be1b9d5101e3f89ef 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/account.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/string3.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char *VarApple;
 static char *VarBanana;
@@ -574,7 +570,8 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
   snprintf(child, sizeof(child), "%s:%s", account, parent);
 
   const char *AccountVarStr[] = {
-    parent, NULL,
+    parent,
+    NULL,
   };
 
   struct Account *ac = ac_create(cs, account, AccountVarStr);
index ea833eddeccf21e952c8e15de626618dfa4e3f3c..8a7eb42f1566687dab7b8233eb154bb65400de88 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include "mutt/buffer.h"
-#include "mutt/memory.h"
-#include "mutt/string2.h"
+#include "mutt/mutt.h"
 #include "config/common.h"
-#include "config/set.h"
-#include "config/string3.h"
-#include "config/types.h"
+#include "config/lib.h"
 
 static char *VarApple;
 static char *VarCherry;