Skip to content

Commit

Permalink
chore: add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandezcuesta committed Nov 19, 2024
1 parent 5834a03 commit b9aaf4f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/rules/test_key_ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def test_locale_accents(self):
'haïr: true\n', conf,
problem=(3, 1))

def test_ignored_key(self):
conf = 'key-ordering:\n ignored-keys: ["n(am|omm)e"]'
def test_ignored_keys(self):
conf = 'key-ordering:\n ignored-keys: ["n(am|omm)e", "^b.*$"]'
self.check('---\n'
'versions:\n'
' - name: v1alpha1\n'
Expand All @@ -167,6 +167,18 @@ def test_ignored_key(self):
' nomme: v3\n'
' value: whatever\n', conf,
problem=(5, 5))
self.check('---\n'
'versions:\n'
' - name: v1alpha1\n'
' baz: qux\n'
' zzz: bad\n'
' foo: bar\n'
' - name: v2\n'
' bar: baz\n'
' - baz: qux\n'
' name: v3\n'
' value: whatever\n', conf,
problem=(6, 5))
self.check('---\n'
'age: 30\n'
'name: John\n'
Expand Down

0 comments on commit b9aaf4f

Please sign in to comment.