1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

unit-test/matcher_t: Fixup Kabi's test

The matcher matches the regexes in reverse order.
This commit is contained in:
Joe Thornber 2018-05-02 13:53:43 +01:00
parent 506ab29bfd
commit 9fe0be871c

View File

@ -74,18 +74,20 @@ static void test_matching(void *fixture)
static void test_kabi_query(void *fixture)
{
// Remember, matches regexes from last to first.
static const char *_patterns[] = {
"loop", "/dev/md.*", ".*"
".*", ".*/dev/md.*", "loop"
};
static struct {
const char *input;
int r;
} _cases[] = {
{"foo", 2},
{"/dev/mapper/vg-lvol1", 2},
{"/dev/mapper/vglvol1", 2},
{"loop", 0},
{"foo", 0},
{"/dev/mapper/vg-lvol1", 0},
{"/dev/mapper/vglvol1", 0},
{"/dev/md1", 1},
{"loop", 2},
};
int r;