Derek Morton ef724ab2bb lib/igt_core.c: Expand --run-subtest functionality.
Added extended wildcard support when specifying --run-subtest.

Wildcard format is as specified in rfc3977 and the uwildmat() implementation
is taken from libinn.
See https://tools.ietf.org/html/rfc3977#section-4 for a description of
allowed wildcard expressions.

v2: Use comma as list separator (Ville Syrjala)
support both ^ and ! as not operators (Dave Gordon)

v3: Updated to use uwildmat() (Dave Gordon)

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
[danvet: Fixup whitespace. Add #include <stdint.h>. Run lint.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-02-17 18:21:12 +01:00

25 lines
528 B
C

#ifndef UWILDMAT_H
#define UWILDMAT_H 1
#include <stdio.h>
#include <sys/types.h>
#include <stdbool.h>
/*
** WILDMAT MATCHING
*/
enum uwildmat {
UWILDMAT_FAIL = 0,
UWILDMAT_MATCH = 1,
UWILDMAT_POISON
};
extern bool is_valid_utf8(const char *start);
extern bool uwildmat(const char *text, const char *pat);
extern bool uwildmat_simple(const char *text, const char *pat);
extern enum uwildmat uwildmat_poison(const char *text, const char *pat);
#endif /* UWILDMAT_H */