mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 16:56:32 +01:00
Improves existing and implements additional tests for multitype filtering.
This commit is contained in:
parent
501264d1e8
commit
64b484ae6c
1 changed files with 10 additions and 4 deletions
|
|
@ -1210,11 +1210,17 @@ class TestBuilding(CommandTest):
|
|||
self.call(building.CmdFind(), self.char1.dbref, "Exact dbref match")
|
||||
self.call(building.CmdFind(), "*TestAccount", "Match")
|
||||
|
||||
self.call(building.CmdFind(), "/char Obj")
|
||||
self.call(building.CmdFind(), "/room Obj")
|
||||
self.call(building.CmdFind(), "/exit Obj")
|
||||
self.call(building.CmdFind(), "/char Obj", "No Matches")
|
||||
self.call(building.CmdFind(), "/room Obj", "No Matches")
|
||||
self.call(building.CmdFind(), "/exit Obj", "No Matches")
|
||||
self.call(building.CmdFind(), "/exact Obj", "One Match")
|
||||
|
||||
# Test multitype filtering
|
||||
with mock.patch('evennia.commands.default.building.CHAR_TYPECLASS', 'evennia.objects.objects.DefaultCharacter'):
|
||||
self.call(building.CmdFind(), "/char/room Obj", "No Matches")
|
||||
self.call(building.CmdFind(), "/char/room/exit Char", "2 Matches")
|
||||
self.call(building.CmdFind(), "/char/room/exit/startswith Cha", "2 Matches")
|
||||
|
||||
# Test null search
|
||||
self.call(building.CmdFind(), "=", "Usage: ")
|
||||
|
||||
|
|
@ -1229,7 +1235,7 @@ class TestBuilding(CommandTest):
|
|||
self.call(building.CmdFind(), "=1- #2", "2 Matches(#1-#2):")
|
||||
self.call(building.CmdFind(), "=1-#2", "2 Matches(#1-#2):")
|
||||
self.call(building.CmdFind(), "=#1-2", "2 Matches(#1-#2):")
|
||||
|
||||
|
||||
def test_script(self):
|
||||
self.call(building.CmdScript(), "Obj = ", "No scripts defined on Obj")
|
||||
self.call(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue