mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
Add test for filtering
This commit is contained in:
@@ -69,6 +69,13 @@ class Channel(Channel):
|
||||
self.responses.append(osc_escape_code)
|
||||
|
||||
|
||||
class NotificationManager(NotificationManager):
|
||||
|
||||
@property
|
||||
def filter_rules(self):
|
||||
yield from ('title:filterme',)
|
||||
|
||||
|
||||
def do_test(self: 'TestNotifications', tdir: str) -> None:
|
||||
di = DesktopIntegration(None)
|
||||
ch = Channel()
|
||||
@@ -162,6 +169,12 @@ def do_test(self: 'TestNotifications', tdir: str) -> None:
|
||||
self.ae(di.notifications, [n()])
|
||||
reset()
|
||||
|
||||
# test filtering
|
||||
h(';title')
|
||||
h(';filterme please')
|
||||
self.ae(di.notifications, [n()])
|
||||
reset()
|
||||
|
||||
# test closing interactions with reporting and activation
|
||||
h('i=c;title')
|
||||
self.ae(di.notifications, [n()])
|
||||
|
||||
Reference in New Issue
Block a user