Branch Coverage

src/mds_footnote.c
Criterion Covered Total %
branch 33 60 55.0


line true false branch
20 66 0 while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++;
0 66 while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++;
0 66 while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++;
0 66 while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++;
21 66 0 while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--;
0 66 while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--;
0 66 while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--;
0 66 while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--;
22 720 66 for (i = a; i < b; i++) {
24 720 0 if (c == ' ' || c == '\t' || c == '\n') {
720 0 if (c == ' ' || c == '\t' || c == '\n') {
0 720 if (c == ' ' || c == '\t' || c == '\n') {
25 0 0 if (!in_ws) { out[j++] = ' '; in_ws = 1; }
27 588 132 if (c >= 'A' && c <= 'Z') c = (unsigned char)(c + 0x20);
0 588 if (c >= 'A' && c <= 'Z') c = (unsigned char)(c + 0x20);
38 63 0 if (n) memcpy(d, s, n);
55 45 0 if (!t || !t->len) return NULL;
0 45 if (!t || !t->len) return NULL;
56 0 45 if (llen > sizeof buf) return NULL;
58 93 3 for (i = 0; i < t->len; i++) {
59 42 51 if (t->entries[i].klen == nlen &&
42 0 if (t->entries[i].klen == nlen &&
60 42 0 (nlen == 0 || memcmp(t->entries[i].key, buf, nlen) == 0))
73 0 21 if (llen > sizeof nbuf) return 0;
76 30 21 for (i = 0; i < t->len; i++) {
77 0 30 if (t->entries[i].klen == nlen &&
0 0 if (t->entries[i].klen == nlen &&
78 0 0 (nlen == 0 || memcmp(t->entries[i].key, nbuf, nlen) == 0))
81 9 12 if (t->len == t->cap) {
82 0 9 size_t nc = t->cap ? t->cap * 2 : 8;