mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
parser: add trailing / glob unit tests for convert_aaregex_to_pcre()
Thanks to Seth Arnold for the suggestion. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
@@ -1390,9 +1390,11 @@ static int test_aaregex_to_pcre(void)
|
||||
MY_REGEX_TEST("/*", "/[^/\\x00][^/\\x00]*", ePatternRegex);
|
||||
MY_REGEX_TEST("/blort/*", "/blort/[^/\\x00][^/\\x00]*", ePatternRegex);
|
||||
MY_REGEX_TEST("/*/blort", "/[^/\\x00][^/\\x00]*/blort", ePatternRegex);
|
||||
MY_REGEX_TEST("/*/", "/[^/\\x00][^/\\x00]*/", ePatternRegex);
|
||||
MY_REGEX_TEST("/**", "/[^/\\x00][^\\x00]*", ePatternTailGlob);
|
||||
MY_REGEX_TEST("/blort/**", "/blort/[^/\\x00][^\\x00]*", ePatternTailGlob);
|
||||
MY_REGEX_TEST("/**/blort", "/[^/\\x00][^\\x00]*/blort", ePatternRegex);
|
||||
MY_REGEX_TEST("/**/", "/[^/\\x00][^\\x00]*/", ePatternRegex);
|
||||
|
||||
/* more complicated quoting */
|
||||
MY_REGEX_FAIL_TEST("\\\\[");
|
||||
|
Reference in New Issue
Block a user