apparmor/utils/test/regex_tests.ini
Seth Arnold 0ba4c8cd7e Ensure the that the {**,} and {,**} regexs are being properly parsed by
the Python tools.

Signed-off-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-08-14 10:51:42 -07:00

81 lines
2 KiB
INI

# ----------------------------------------------------------------------
# Copyright (C) 2013 Kshitij Gupta <kgupta8592@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# ----------------------------------------------------------------------
[/foo/**/bar/]
/foo/user/tools/bar/ = True
/foo/apparmor/bar/ = True
/foo/apparmor/bar = False
[/foo/*/bar/]
/foo/apparmor/bar/ = True
/foo/apparmor/tools/bar/ = False
/foo/apparmor/bar = False
[/foo/{foo,bar,user,other}/bar/]
/foo/user/bar/ = True
/foo/bar/bar/ = True
/foo/wrong/bar/ = False
[/foo/{foo,bar,user,other}/test,ca}se/{aa,sd,nd}/bar/]
/foo/user/test,ca}se/aa/bar/ = True
/foo/bar/test,ca}se/sd/bar/ = True
/foo/wrong/user/bar/ = False
/foo/user/wrong/bar/ = False
/foo/wrong/aa/bar/ = False
[/foo/user/ba?/]
/foo/user/bar/ = True
/foo/user/bar/apparmor/ = False
/foo/user/ba/ = False
/foo/user/ba// = False
[/foo/user/bar/**]
/foo/user/bar/apparmor = True
/foo/user/bar/apparmor/tools = True
/foo/user/bar/ = False
[/foo/user/bar/*]
/foo/user/bar/apparmor = True
/foo/user/bar/apparmor/tools = False
/foo/user/bar/ = False
/foo/user/bar/apparmor/ = False
[/foo/**.jpg]
/foo/bar/baz/foobar.jpg = True
/foo/bar/foobar.jpg = True
/foo/bar/*.jpg = True
/foo/bar.jpg = True
/foo/barjpg = False
/foo/.* = False
/foo/**.jpg = True
/foo/*.jpg = True
/bar.jpg = False
/**.jpg = False
/*.jpg = False
/foo/*.bar = False
[/foo/{**,}]
/foo/ = True
/foo/bar = True
/foo/bar/ = True
/foo/bar/baz = True
/foo/bar/baz/ = True
/bar/ = False
[/foo/{,**}]
/foo/ = True
/foo/bar = True
/foo/bar/ = True
/foo/bar/baz = True
/foo/bar/baz/ = True
/bar/ = False