summaryrefslogtreecommitdiffstats
path: root/test/config/bool.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/config/bool.c')
-rw-r--r--test/config/bool.c202
1 files changed, 101 insertions, 101 deletions
diff --git a/test/config/bool.c b/test/config/bool.c
index ddde6bc8b..14556abc9 100644
--- a/test/config/bool.c
+++ b/test/config/bool.c
@@ -63,19 +63,19 @@ static bool test_initial_values(struct ConfigSubset *sub, struct Buffer *err)
bool VarApple = cs_subset_bool(sub, "Apple");
bool VarBanana = cs_subset_bool(sub, "Banana");
- TEST_MSG("Apple = %d\n", VarApple);
- TEST_MSG("Banana = %d\n", VarBanana);
+ TEST_MSG("Apple = %d", VarApple);
+ TEST_MSG("Banana = %d", VarBanana);
if (!TEST_CHECK(VarApple == false))
{
- TEST_MSG("Expected: %d\n", false);
- TEST_MSG("Actual : %d\n", VarApple);
+ TEST_MSG("Expected: %d", false);
+ TEST_MSG("Actual : %d", VarApple);
}
if (!TEST_CHECK(VarBanana == true))
{
- TEST_MSG("Expected: %d\n", true);
- TEST_MSG("Actual : %d\n", VarBanana);
+ TEST_MSG("Expected: %d", true);
+ TEST_MSG("Actual : %d", VarBanana);
}
cs_str_string_set(cs, "Apple", "true", err);
@@ -89,43 +89,43 @@ static bool test_initial_values(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_initial_get(cs, "Apple", value);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(value));
+ TEST_MSG("%s", buf_string(value));
return false;
}
if (!TEST_CHECK_STR_EQ(buf_string(value), "no"))
{
- TEST_MSG("Apple's initial value is wrong: '%s'\n", buf_string(value));
+ TEST_MSG("Apple's initial value is wrong: '%s'", buf_string(value));
return false;
}
VarApple = cs_subset_bool(sub, "Apple");
- TEST_MSG("Apple = '%s'\n", VarApple ? "yes" : "no");
- TEST_MSG("Apple's initial value is '%s'\n", buf_string(value));
+ TEST_MSG("Apple = '%s'", VarApple ? "yes" : "no");
+ TEST_MSG("Apple's initial value is '%s'", buf_string(value));
buf_reset(value);
rc = cs_str_initial_get(cs, "Banana", value);
if (CSR_RESULT(rc) != CSR_SUCCESS)
{
- TEST_MSG("%s\n", buf_string(value));
+ TEST_MSG("%s", buf_string(value));
return false;
}
if (!TEST_CHECK_STR_EQ(buf_string(value), "yes"))
{
- TEST_MSG("Banana's initial value is wrong: '%s'\n", buf_string(value));
+ TEST_MSG("Banana's initial value is wrong: '%s'", buf_string(value));
return false;
}
VarBanana = cs_subset_bool(sub, "Banana");
- TEST_MSG("Banana = '%s'\n", VarBanana ? "yes" : "no");
- TEST_MSG("Banana's initial value is '%s'\n", NONULL(buf_string(value)));
+ TEST_MSG("Banana = '%s'", VarBanana ? "yes" : "no");
+ TEST_MSG("Banana's initial value is '%s'", NONULL(buf_string(value)));
buf_reset(value);
rc = cs_str_initial_set(cs, "Cherry", "yes", value);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(value));
+ TEST_MSG("%s", buf_string(value));
return false;
}
@@ -133,13 +133,13 @@ static bool test_initial_values(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_initial_get(cs, "Cherry", value);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(value));
+ TEST_MSG("%s", buf_string(value));
return false;
}
bool VarCherry = cs_subset_bool(sub, "Cherry");
- TEST_MSG("Cherry = '%s'\n", VarCherry ? "yes" : "no");
- TEST_MSG("Cherry's initial value is '%s'\n", NONULL(buf_string(value)));
+ TEST_MSG("Cherry = '%s'", VarCherry ? "yes" : "no");
+ TEST_MSG("Cherry's initial value is '%s'", NONULL(buf_string(value)));
buf_pool_release(&value);
log_line(__func__);
@@ -169,22 +169,22 @@ static bool test_string_set(struct ConfigSubset *sub, struct Buffer *err)
{
cs_str_native_set(cs, name, ((i + 1) % 2), NULL);
- TEST_MSG("Setting %s to %s\n", name, valid[i]);
+ TEST_MSG("Setting %s to %s", name, valid[i]);
buf_reset(err);
rc = cs_str_string_set(cs, name, valid[i], err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarDamson = cs_subset_bool(sub, "Damson");
if (VarDamson != (i % 2))
{
- TEST_MSG("Value of %s wasn't changed\n", name);
+ TEST_MSG("Value of %s wasn't changed", name);
return false;
}
- TEST_MSG("%s = %d, set by '%s'\n", name, VarDamson, valid[i]);
+ TEST_MSG("%s = %d, set by '%s'", name, VarDamson, valid[i]);
short_line();
}
@@ -192,11 +192,11 @@ static bool test_string_set(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_string_set(cs, name, "yes", err);
if (TEST_CHECK(rc & CSR_SUC_NO_CHANGE))
{
- TEST_MSG("Value of %s wasn't changed\n", name);
+ TEST_MSG("Value of %s wasn't changed", name);
}
else
{
- TEST_MSG("This test should have failed\n");
+ TEST_MSG("This test should have failed");
return false;
}
@@ -207,13 +207,13 @@ static bool test_string_set(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_string_set(cs, name, invalid[i], err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
VarDamson = cs_subset_bool(sub, "Damson");
- TEST_MSG("%s = %d, set by '%s'\n", name, VarDamson, invalid[i]);
- TEST_MSG("This test should have failed\n");
+ TEST_MSG("%s = %d, set by '%s'", name, VarDamson, invalid[i]);
+ TEST_MSG("This test should have failed");
return false;
}
short_line();
@@ -236,29 +236,29 @@ static bool test_string_get(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_string_get(cs, name, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Get failed: %s\n", buf_string(err));
+ TEST_MSG("Get failed: %s", buf_string(err));
return false;
}
bool VarElderberry = cs_subset_bool(sub, "Elderberry");
- TEST_MSG("%s = %d, %s\n", name, VarElderberry, buf_string(err));
+ TEST_MSG("%s = %d, %s", name, VarElderberry, buf_string(err));
cs_str_native_set(cs, name, true, NULL);
buf_reset(err);
rc = cs_str_string_get(cs, name, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Get failed: %s\n", buf_string(err));
+ TEST_MSG("Get failed: %s", buf_string(err));
return false;
}
VarElderberry = cs_subset_bool(sub, "Elderberry");
- TEST_MSG("%s = %d, %s\n", name, VarElderberry, buf_string(err));
+ TEST_MSG("%s = %d, %s", name, VarElderberry, buf_string(err));
// cs_str_native_set(cs, name, 3, NULL);
// buf_reset(err);
// rc = cs_str_string_get(cs, name, err);
// if (!TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
// {
- // TEST_MSG("Get succeeded with invalid value: %s\n", buf_string(err));
+ // TEST_MSG("Get succeeded with invalid value: %s", buf_string(err));
// return false;
// }
@@ -274,38 +274,38 @@ static bool test_native_set(struct ConfigSubset *sub, struct Buffer *err)
const char *name = "Fig";
bool value = true;
- TEST_MSG("Setting %s to %d\n", name, value);
+ TEST_MSG("Setting %s to %d", name, value);
cs_str_native_set(cs, name, false, NULL);
buf_reset(err);
int rc = cs_str_native_set(cs, name, value, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
bool VarFig = cs_subset_bool(sub, "Fig");
if (!TEST_CHECK(VarFig == value))
{
- TEST_MSG("Value of %s wasn't changed\n", name);
+ TEST_MSG("Value of %s wasn't changed", name);
return false;
}
- TEST_MSG("%s = %d, set to '%d'\n", name, VarFig, value);
+ TEST_MSG("%s = %d, set to '%d'", name, VarFig, value);
short_line();
buf_reset(err);
- TEST_MSG("Setting %s to %d\n", name, value);
+ TEST_MSG("Setting %s to %d", name, value);
rc = cs_str_native_set(cs, name, value, err);
if (!TEST_CHECK((rc & CSR_SUC_NO_CHANGE) != 0))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
if (rc & CSR_SUC_NO_CHANGE)
{
- TEST_MSG("Value of %s wasn't changed\n", name);
+ TEST_MSG("Value of %s wasn't changed", name);
}
int invalid[] = { -1, 2 };
@@ -313,18 +313,18 @@ static bool test_native_set(struct ConfigSubset *sub, struct Buffer *err)
{
short_line();
cs_str_native_set(cs, name, false, NULL);
- TEST_MSG("Setting %s to %d\n", name, invalid[i]);
+ TEST_MSG("Setting %s to %d", name, invalid[i]);
buf_reset(err);
rc = cs_str_native_set(cs, name, invalid[i], err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
VarFig = cs_subset_bool(sub, "Fig");
- TEST_MSG("%s = %d, set by '%d'\n", name, VarFig, invalid[i]);
- TEST_MSG("This test should have failed\n");
+ TEST_MSG("%s = %d, set by '%d'", name, VarFig, invalid[i]);
+ TEST_MSG("This test should have failed");
return false;
}
}
@@ -345,10 +345,10 @@ static bool test_native_get(struct ConfigSubset *sub, struct Buffer *err)
intptr_t value = cs_str_native_get(cs, name, err);
if (!TEST_CHECK(value != INT_MIN))
{
- TEST_MSG("Get failed: %s\n", buf_string(err));
+ TEST_MSG("Get failed: %s", buf_string(err));
return false;
}
- TEST_MSG("%s = %ld\n", name, value);
+ TEST_MSG("%s = %ld", name, value);
log_line(__func__);
return true;
@@ -364,67 +364,67 @@ static bool test_reset(struct ConfigSubset *sub, struct Buffer *err)
buf_reset(err);
bool VarHawthorn = cs_subset_bool(sub, "Hawthorn");
- TEST_MSG("%s = %d\n", name, VarHawthorn);
+ TEST_MSG("%s = %d", name, VarHawthorn);
int rc = cs_str_reset(cs, name, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarHawthorn = cs_subset_bool(sub, "Hawthorn");
if (!TEST_CHECK(VarHawthorn != true))
{
- TEST_MSG("Value of %s wasn't changed\n", name);
+ TEST_MSG("Value of %s wasn't changed", name);
return false;
}
- TEST_MSG("Reset: %s = %d\n", name, VarHawthorn);
+ TEST_MSG("Reset: %s = %d", name, VarHawthorn);
short_line();
name = "Ilama";
buf_reset(err);
bool VarIlama = cs_subset_bool(sub, "Ilama");
- TEST_MSG("Initial: %s = %d\n", name, VarIlama);
+ TEST_MSG("Initial: %s = %d", name, VarIlama);
dont_fail = true;
rc = cs_str_string_set(cs, name, "yes", err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
return false;
VarIlama = cs_subset_bool(sub, "Ilama");
- TEST_MSG("Set: %s = %d\n", name, VarIlama);
+ TEST_MSG("Set: %s = %d", name, VarIlama);
dont_fail = false;
rc = cs_str_reset(cs, name, err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
rc = cs_str_reset(cs, "unknown", err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarIlama = cs_subset_bool(sub, "Ilama");
if (!TEST_CHECK(VarIlama))
{
- TEST_MSG("Value of %s changed\n", name);
+ TEST_MSG("Value of %s changed", name);
return false;
}
- TEST_MSG("Reset: %s = %d\n", name, VarIlama);
+ TEST_MSG("Reset: %s = %d", name, VarIlama);
log_line(__func__);
return true;
@@ -441,15 +441,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
int rc = cs_str_string_set(cs, name, "yes", err);
if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
bool VarJackfruit = cs_subset_bool(sub, "Jackfruit");
- TEST_MSG("String: %s = %d\n", name, VarJackfruit);
+ TEST_MSG("String: %s = %d", name, VarJackfruit);
short_line();
cs_str_native_set(cs, name, false, NULL);
@@ -457,15 +457,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_native_set(cs, name, 1, err);
if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarJackfruit = cs_subset_bool(sub, "Jackfruit");
- TEST_MSG("Native: %s = %d\n", name, VarJackfruit);
+ TEST_MSG("Native: %s = %d", name, VarJackfruit);
short_line();
name = "Kumquat";
@@ -474,15 +474,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_string_set(cs, name, "yes", err);
if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
bool VarKumquat = cs_subset_bool(sub, "Kumquat");
- TEST_MSG("String: %s = %d\n", name, VarKumquat);
+ TEST_MSG("String: %s = %d", name, VarKumquat);
short_line();
cs_str_native_set(cs, name, false, NULL);
@@ -490,15 +490,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_native_set(cs, name, 1, err);
if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarKumquat = cs_subset_bool(sub, "Kumquat");
- TEST_MSG("Native: %s = %d\n", name, VarKumquat);
+ TEST_MSG("Native: %s = %d", name, VarKumquat);
short_line();
name = "Lemon";
@@ -507,15 +507,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_string_set(cs, name, "yes", err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
bool VarLemon = cs_subset_bool(sub, "Lemon");
- TEST_MSG("String: %s = %d\n", name, VarLemon);
+ TEST_MSG("String: %s = %d", name, VarLemon);
short_line();
cs_str_native_set(cs, name, false, NULL);
@@ -523,15 +523,15 @@ static bool test_validator(struct ConfigSubset *sub, struct Buffer *err)
rc = cs_str_native_set(cs, name, 1, err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
- TEST_MSG("%s\n", buf_string(err));
+ TEST_MSG("%s", buf_string(err));
return false;
}
VarLemon = cs_subset_bool(sub, "Lemon");
- TEST_MSG("Native: %s = %d\n", name, VarLemon);
+ TEST_MSG("Native: %s = %d", name, VarLemon);
log_line(__func__);
return true;
@@ -542,8 +542,8 @@ static void dump_native(struct ConfigSet *cs, const char *parent, const char *ch
intptr_t pval = cs_str_native_get(cs, parent, NULL);
intptr_t cval = cs_str_native_get(cs, child, NULL);
- TEST_MSG("%15s = %ld\n", parent, pval);
- TEST_MSG("%15s = %ld\n", child, cval);
+ TEST_MSG("%15s = %ld", parent, pval);
+ TEST_MSG("%15s = %ld", child, cval);
}
static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
@@ -563,7 +563,7 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
struct HashElem *he = cs_subset_create_inheritance(a->sub, parent);
if (!he)
{
- TEST_MSG("Error: %s\n", buf_string(err));
+ TEST_MSG("Error: %s", buf_string(err));
goto ti_out;
}
@@ -573,7 +573,7 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
int rc = cs_str_string_set(cs, parent, "1", err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Error: %s\n", buf_string(err));
+ TEST_MSG("Error: %s", buf_string(err));
goto ti_out;
}
dump_native(cs, parent, child);
@@ -584,12 +584,12 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
rc = cs_str_string_set(cs, child, "0", err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Error: %s\n", buf_string(err));
+ TEST_MSG("Error: %s", buf_string(err));
goto ti_out;
}
if (rc & CSR_SUC_NO_CHANGE)
{
- TEST_MSG("Value of %s wasn't changed\n", parent);
+ TEST_MSG("Value of %s wasn't changed", parent);
}
dump_native(cs, parent, child);
short_line();
@@ -599,7 +599,7 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
rc = cs_str_reset(cs, child, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Error: %s\n", buf_string(err));
+ TEST_MSG("Error: %s", buf_string(err));
goto ti_out;
}
dump_native(cs, parent, child);
@@ -613,7 +613,7 @@ static bool test_inherit(struct ConfigSet *cs, struct Buffer *err)
rc = cs_str_reset(cs, parent, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Error: %s\n", buf_string(err));
+ TEST_MSG("Error: %s", buf_string(err));
goto ti_out;
}
dump_native(cs, parent, child);
@@ -649,28 +649,28 @@ static bool test_toggle(struct ConfigSubset *sub, struct Buffer *err)
rc = bool_he_toggle(NULL, he, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_ERR_CODE))
{
- TEST_MSG("Toggle succeeded when is shouldn't have\n");
+ TEST_MSG("Toggle succeeded when is shouldn't have");
return false;
}
rc = bool_he_toggle(NeoMutt->sub, NULL, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_ERR_CODE))
{
- TEST_MSG("Toggle succeeded when is shouldn't have\n");
+ TEST_MSG("Toggle succeeded when is shouldn't have");
return false;
}
rc = bool_str_toggle(NULL, "Apple", err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_ERR_CODE))
{
- TEST_MSG("Toggle succeeded when is shouldn't have\n");
+ TEST_MSG("Toggle succeeded when is shouldn't have");
return false;
}
rc = bool_str_toggle(NeoMutt->sub, NULL, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_ERR_CODE))
{
- TEST_MSG("Toggle succeeded when is shouldn't have\n");
+ TEST_MSG("Toggle succeeded when is shouldn't have");
return false;
}
@@ -678,35 +678,35 @@ static bool test_toggle(struct ConfigSubset *sub, struct Buffer *err)
{
bool before = tests[i].before;
bool after = tests[i].after;
- TEST_MSG("test %zu\n", i);
+ TEST_MSG("test %zu", i);
cs_str_native_set(cs, name, before, NULL);
buf_reset(err);
intptr_t value = cs_he_native_get(cs, he, err);
if (!TEST_CHECK(value != INT_MIN))
{
- TEST_MSG("Get failed: %s\n", buf_string(err));
+ TEST_MSG("Get failed: %s", buf_string(err));
return false;
}
bool copy = value;
if (!TEST_CHECK(copy == before))
{
- TEST_MSG("Initial value is wrong: %s\n", buf_string(err));
+ TEST_MSG("Initial value is wrong: %s", buf_string(err));
return false;
}
rc = bool_he_toggle(NeoMutt->sub, he, err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Toggle failed: %s\n", buf_string(err));
+ TEST_MSG("Toggle failed: %s", buf_string(err));
return false;
}
bool VarNectarine = cs_subset_bool(sub, "Nectarine");
if (!TEST_CHECK(VarNectarine == after))
{
- TEST_MSG("Toggle value is wrong: %s\n", buf_string(err));
+ TEST_MSG("Toggle value is wrong: %s", buf_string(err));
return false;
}
short_line();
@@ -716,35 +716,35 @@ static bool test_toggle(struct ConfigSubset *sub, struct Buffer *err)
{
bool before = tests[i].before;
bool after = tests[i].after;
- TEST_MSG("test %zu\n", i);
+ TEST_MSG("test %zu", i);
cs_str_native_set(cs, name, before, NULL);
buf_reset(err);
intptr_t value = cs_he_native_get(cs, he, err);
if (!TEST_CHECK(value != INT_MIN))
{
- TEST_MSG("Get failed: %s\n", buf_string(err));
+ TEST_MSG("Get failed: %s", buf_string(err));
return false;
}
bool copy = value;
if (!TEST_CHECK(copy == before))
{
- TEST_MSG("Initial value is wrong: %s\n", buf_string(err));
+ TEST_MSG("Initial value is wrong: %s", buf_string(err));
return false;
}
rc = bool_str_toggle(NeoMutt->sub, "Nectarine", err);
if (!TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
- TEST_MSG("Toggle failed: %s\n", buf_string(err));
+ TEST_MSG("Toggle failed: %s", buf_string(err));
return false;
}
bool VarNectarine = cs_subset_bool(sub, "Nectarine");
if (!TEST_CHECK(VarNectarine == after))
{
- TEST_MSG("Toggle value is wrong: %s\n", buf_string(err));
+ TEST_MSG("Toggle value is wrong: %s", buf_string(err));
return false;
}
short_line();
@@ -755,7 +755,7 @@ static bool test_toggle(struct ConfigSubset *sub, struct Buffer *err)
rc = bool_he_toggle(&sub2, he, err);
if (!TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
name = "Olive";
@@ -767,18 +767,18 @@ static bool test_toggle(struct ConfigSubset *sub, struct Buffer *err)
rc = bool_he_toggle(NeoMutt->sub, he, err);
if (!TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
buf_reset(err);
rc = bool_str_toggle(NeoMutt->sub, "unknown", err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error: %s\n", buf_string(err));
+ TEST_MSG("Expected error: %s", buf_string(err));
}
else
{
- TEST_MSG("This test should have failed\n");
+ TEST_MSG("This test should have failed");
return false;
}