Skip to content

Commit 56394ca

Browse files
committed
Added regression tests for MongoDB $regexMatch pattern matching.
1 parent 36622ce commit 56394ca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/expressions/tests.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,17 @@ def test_patterns_escape(self):
13391339
Employee(firstname="Jean-Claude", lastname="Claude%"),
13401340
Employee(firstname="Johnny", lastname="Joh\\n"),
13411341
Employee(firstname="Johnny", lastname="_ohn"),
1342+
Employee(firstname="Johnny", lastname="^Joh"),
1343+
Employee(firstname="Johnny", lastname="Johnny$"),
1344+
Employee(firstname="Johnny", lastname="Joh."),
1345+
Employee(firstname="Johnny", lastname="[J]ohnny"),
1346+
Employee(firstname="Johnny", lastname="(J)ohnny"),
1347+
Employee(firstname="Johnny", lastname="J*ohnny"),
1348+
Employee(firstname="Johnny", lastname="J+ohnny"),
1349+
Employee(firstname="Johnny", lastname="J?ohnny"),
1350+
Employee(firstname="Johnny", lastname="J{1}ohnny"),
1351+
Employee(firstname="Johnny", lastname="J|ohnny"),
1352+
Employee(firstname="Johnny", lastname="J-ohnny"),
13421353
]
13431354
)
13441355
claude = Employee.objects.create(firstname="Jean-Claude", lastname="Claude")

0 commit comments

Comments
 (0)