Add negative test for globs on body only matching full words

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
This commit is contained in:
Nicolas Werner 2022-07-04 21:35:59 +02:00
parent 48fc634825
commit b24b1a1884
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9

View File

@ -106,6 +106,7 @@ class PushRulesConditionTest : MatrixTest {
val condition = EventMatchCondition("content.body", "cake*lie", false) val condition = EventMatchCondition("content.body", "cake*lie", false)
assert(condition.isSatisfied(createSimpleTextEvent("How was the cakeisalie?"))) assert(condition.isSatisfied(createSimpleTextEvent("How was the cakeisalie?")))
assertFalse(condition.isSatisfied(createSimpleTextEvent("How was the notcakeisalie?")))
} }
@Test @Test