Branch Coverage

src/match_engine.c
Criterion Covered Total %
branch 48 62 77.4


line true false branch
80 14 35 if (*matching == NULL) {
84 0 49 if (add_pattern(&((*matching)->exclusions), pattern) < 0) {
100 7 14 if ((lr = lafe_line_reader(pathname, 0)) == NULL) {
104 49 0 while (lafe_line_reader_next(lr, &p) == 0) {
105 14 35 if (p == NULL) {
109 0 35 if (lafe_exclude(matching, p) != 0) {
123 14 35 if (*matching == NULL) {
127 0 49 if (add_pattern(&((*matching)->inclusions), pattern) < 0) {
145 7 14 if ((lr = lafe_line_reader(pathname, nullSeparator)) == NULL) {
149 49 0 while (lafe_line_reader_next(lr, &p) == 0) {
150 14 35 if (p == NULL) {
154 0 35 if (lafe_include(matching, p) != 0) {
173 0 98 if (match == NULL) {
180 98 0 if (len && match->pattern[len - 1] == '/') {
0 98 if (len && match->pattern[len - 1] == '/') {
197 0 322 if (matching == NULL) {
208 343 322 for (match = matching->inclusions; match != NULL; match = match->next) {
209 175 168 if (match->matches == 0 && match_inclusion(match, pathname)) {
49 126 if (match->matches == 0 && match_inclusion(match, pathname)) {
217 567 203 for (match = matching->exclusions; match != NULL; match = match->next){
218 119 448 if (match_exclusion(match, pathname)) {
224 49 154 if (matched != NULL) {
230 168 154 for (match = matching->inclusions; match != NULL; match = match->next){
232 105 63 if (match->matches > 0 && match_inclusion(match, pathname)) {
0 105 if (match->matches > 0 && match_inclusion(match, pathname)) {
240 49 105 if (matching->inclusions != NULL) {
276 64 28 if (*matching == NULL) {
280 49 28 for (p = (*matching)->inclusions; p != NULL; ) {
287 49 28 for (p = (*matching)->exclusions; p != NULL; ) {
301 0 28 if ((*matching = calloc(sizeof(**matching), 1)) == NULL) {
312 0 0 if (matching == NULL) {