Skip to content

Commit a6c3b9a

Browse files
committed
Added regression tests for MongoDB $regexMatch pattern matching.
1 parent 696d57a commit a6c3b9a

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
@@ -1229,6 +1229,17 @@ def test_patterns_escape(self):
12291229
Employee(firstname="Jean-Claude", lastname="Claude%"),
12301230
Employee(firstname="Johnny", lastname="Joh\\n"),
12311231
Employee(firstname="Johnny", lastname="_ohn"),
1232+
Employee(firstname="Johnny", lastname="^Joh"),
1233+
Employee(firstname="Johnny", lastname="Johnny$"),
1234+
Employee(firstname="Johnny", lastname="Joh."),
1235+
Employee(firstname="Johnny", lastname="[J]ohnny"),
1236+
Employee(firstname="Johnny", lastname="(J)ohnny"),
1237+
Employee(firstname="Johnny", lastname="J*ohnny"),
1238+
Employee(firstname="Johnny", lastname="J+ohnny"),
1239+
Employee(firstname="Johnny", lastname="J?ohnny"),
1240+
Employee(firstname="Johnny", lastname="J{1}ohnny"),
1241+
Employee(firstname="Johnny", lastname="J|ohnny"),
1242+
Employee(firstname="Johnny", lastname="J-ohnny"),
12321243
]
12331244
)
12341245
claude = Employee.objects.create(firstname="Jean-Claude", lastname="Claude")

0 commit comments

Comments
 (0)