void test_mutt_mb_charlen(void)
{
// int mutt_mb_charlen(const char *s, int *width);
+
+ {
+ int width = 0;
+ TEST_CHECK(mutt_mb_charlen(NULL, &width) == 0);
+ }
+
+ {
+ TEST_CHECK(mutt_mb_charlen("apple", NULL) != 0);
+ }
}
void test_mutt_mb_filter_unprintable(void)
{
// int mutt_mb_filter_unprintable(char **s);
+
+ {
+ TEST_CHECK(mutt_mb_filter_unprintable(NULL) != 0);
+ }
+
+ {
+ char *s = NULL;
+ TEST_CHECK(mutt_mb_filter_unprintable(&s) != 0);
+ }
}
void test_mutt_mb_get_initials(void)
{
// bool mutt_mb_get_initials(const char *name, char *buf, size_t buflen);
+
+ {
+ char buf[32] = { 0 };
+ TEST_CHECK(!mutt_mb_get_initials(NULL, buf, sizeof(buf)));
+ }
+
+ {
+ TEST_CHECK(!mutt_mb_get_initials("apple", NULL, 10));
+ }
}
void test_mutt_mb_is_lower(void)
{
// bool mutt_mb_is_lower(const char *s);
+
+ {
+ TEST_CHECK(!mutt_mb_is_lower(NULL));
+ }
}
void test_mutt_mb_mbstowcs(void)
{
// size_t mutt_mb_mbstowcs(wchar_t **pwbuf, size_t *pwbuflen, size_t i, char *buf);
+
+ {
+ size_t pwbuflen = 0;
+ TEST_CHECK(mutt_mb_mbstowcs(NULL, &pwbuflen, 0, "apple") == 0);
+ }
+
+ {
+ wchar_t *wbuf = NULL;
+ TEST_CHECK(mutt_mb_mbstowcs(&wbuf, NULL, 0, "apple") == 0);
+ }
+
+ {
+ wchar_t *wbuf = NULL;
+ size_t pwbuflen = 0;
+ TEST_CHECK(mutt_mb_mbstowcs(&wbuf, &pwbuflen, 0, NULL) == 0);
+ }
}
void test_mutt_mb_wcstombs(void)
{
// void mutt_mb_wcstombs(char *dest, size_t dlen, const wchar_t *src, size_t slen);
+
+ {
+ wchar_t src[32] = L"apple";
+ mutt_mb_wcstombs(NULL, 10, src, 3);
+ TEST_CHECK_(1, "mutt_mb_wcstombs(&buf, sizeof(buf), src, 3)");
+ }
+
+ {
+ char buf[32] = { 0 };
+ mutt_mb_wcstombs(buf, sizeof(buf), NULL, 3);
+ TEST_CHECK_(1, "mutt_mb_wcstombs(&buf, sizeof(buf), NULL, 3)");
+ }
}
void test_mutt_mb_wcswidth(void)
{
// int mutt_mb_wcswidth(const wchar_t *s, size_t n);
+
+ {
+ TEST_CHECK(mutt_mb_wcswidth(NULL, 0) == 0);
+ }
}
void test_mutt_mb_width(void)
{
// int mutt_mb_width(const char *str, int col, bool display);
+
+ {
+ TEST_CHECK(mutt_mb_width(NULL, 0, false) == 0);
+ }
}
void test_mutt_mb_width_ceiling(void)
{
// size_t mutt_mb_width_ceiling(const wchar_t *s, size_t n, int w1);
+
+ {
+ TEST_CHECK(mutt_mb_width_ceiling(NULL, 0, 0) == 0);
+ }
}