mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
add re_match_include_parse() test with invalid rule name
... to increase test coverity of regex.py to 100%.
This commit is contained in:
parent
20234d240e
commit
c3d3203a60
1 changed files with 3 additions and 2 deletions
|
@ -594,14 +594,15 @@ class Test_re_match_include_parse_abi(AATest):
|
|||
def _run_test(self, params, expected):
|
||||
self.assertEqual(re_match_include_parse(params, 'abi'), expected)
|
||||
|
||||
class Test_re_match_include_parse_empty_filename(AATest):
|
||||
class Test_re_match_include_parse_errors(AATest):
|
||||
tests = [
|
||||
(('include <>', 'include'), AppArmorException),
|
||||
(('include <>', 'include'), AppArmorException), # various rules with empty filename
|
||||
(('include ""', 'include'), AppArmorException),
|
||||
(('include ', 'include'), AppArmorException),
|
||||
(('abi <>,', 'abi'), AppArmorException),
|
||||
(('abi "",', 'abi'), AppArmorException),
|
||||
(('abi ,', 'abi'), AppArmorException),
|
||||
(('abi <foo>,', 'invalid'), AppArmorBug), # invalid rule name
|
||||
]
|
||||
|
||||
def _run_test(self, params, expected):
|
||||
|
|
Loading…
Add table
Reference in a new issue