Branch Coverage

src/match_path.c
Criterion Covered Total %
branch 50 120 41.6


line true false branch
70 0 56 if ((*p == '!' || *p == '^') && p < end) {
0 0 if ((*p == '!' || *p == '^') && p < end) {
56 0 if ((*p == '!' || *p == '^') && p < end) {
76 56 56 while (p < end) {
81 0 28 if ((rangeStart == '\0') || (p == end - 1)) {
0 0 if ((rangeStart == '\0') || (p == end - 1)) {
82 0 28 if (*p == c)
86 0 0 if (rangeEnd == '\\')
88 0 0 if ((rangeStart <= c) && (c <= rangeEnd))
0 0 if ((rangeStart <= c) && (c <= rangeEnd))
96 0 28 if (*p == c)
111 28 28 while ((*s == '/')
112 0 28 || (s[0] == '.' && s[1] == '/')
0 0 || (s[0] == '.' && s[1] == '/')
113 0 28 || (s[0] == '.' && s[1] == '\0'))
0 0 || (s[0] == '.' && s[1] == '\0'))
126 28 1855 if (s[0] == '.' && s[1] == '/')
0 28 if (s[0] == '.' && s[1] == '/')
128 0 1883 if (p[0] == '.' && p[1] == '/')
0 0 if (p[0] == '.' && p[1] == '/')
134 56 84 if (s[0] == '/') {
135 56 0 if (flags & PATHMATCH_NO_ANCHOR_END)
143 0 0 if (*s == '\0')
148 84 84 while (*p == '*')
151 28 56 if (*p == '\0')
153 196 0 while (*s) {
154 56 140 if (lafe_pathmatch(p, s, flags))
165 168 0 while (*end != '\0' && *end != ']') {
112 56 while (*end != '\0' && *end != ']') {
166 0 112 if (*end == '\\' && end[1] != '\0')
0 0 if (*end == '\\' && end[1] != '\0')
170 56 0 if (*end == ']') {
172 0 56 if (!pm_list(p + 1, end, *s, flags))
178 0 0 if (*p != *s)
183 0 0 if (p[1] == '\0') {
184 0 0 if (*s != '\\')
188 0 0 if (*p != *s)
193 0 14 if (*s != '/' && *s != '\0')
0 0 if (*s != '/' && *s != '\0')
199 0 14 if (*p == '\0' && (flags & PATHMATCH_NO_ANCHOR_END))
0 0 if (*p == '\0' && (flags & PATHMATCH_NO_ANCHOR_END))
207 0 0 if (p[1] == '\0' && (flags & PATHMATCH_NO_ANCHOR_END)){
0 0 if (p[1] == '\0' && (flags & PATHMATCH_NO_ANCHOR_END)){
214 1659 1127 if (*p != *s)
228 1043 0 if (p == NULL || *p == '\0')
0 1043 if (p == NULL || *p == '\0')
229 0 0 return (s == NULL || *s == '\0');
0 0 return (s == NULL || *s == '\0');
232 0 1043 if (*p == '^') {
237 0 1043 if (*p == '/' && *s != '/')
0 0 if (*p == '/' && *s != '/')
241 1043 0 if (*p == '*' || *p == '/' || *p == '/') {
1043 0 if (*p == '*' || *p == '/' || *p == '/') {
0 1043 if (*p == '*' || *p == '/' || *p == '/') {
242 0 0 while (*p == '/')
244 0 0 while (*s == '/')
250 763 280 if (flags & PATHMATCH_NO_ANCHOR_START) {
251 1603 588 for ( ; s != NULL; s = strchr(s, '/')) {
252 910 693 if (*s == '/')
254 175 1428 if (pm(p, s, flags))