Fix of FuncParser nested any-output. Resolve #2908, #2902

This commit is contained in:
Griatch 2022-10-13 20:05:42 +02:00
parent 336ef18eb8
commit 4fb5268acd
3 changed files with 52 additions and 19 deletions

View file

@ -788,9 +788,12 @@ class TestCallableSearch(test_resources.BaseEvenniaTest):
# get random result from the possible matches
string = "$choice($objlist(beach,category=zone,type=tag))"
from evennia import set_trace
set_trace()
ret = parser.parse_to_any(string, caller=self.char1, raise_errors=True)
self.assertIn(ret, [self.obj1, self.obj2])
# test wrapping in $obj(), should just pass object through
string = "$obj($choice($objlist(beach,category=zone,type=tag)))"
ret = parser.parse_to_any(string, caller=self.char1, raise_errors=True)
self.assertIn(ret, [self.obj1, self.obj2])