Extend EvMenu test case.

There is now a custom look command, which was not possible with the
previous implementation which used execute_cmd('look'), because that
would infinitely recurse.
This commit is contained in:
Ahmed Charles 2015-10-18 01:15:17 +00:00 committed by Griatch
parent a9f2e33394
commit 609b1777c7

View file

@ -706,6 +706,9 @@ def test_start_node(caller):
"desc": "Set an attribute on yourself.",
"exec": lambda caller: caller.attributes.add("menuattrtest", "Test value"),
"goto": "test_set_node"},
{"key": ("{yL{nook", "l"),
"desc": "Look and see a custom message.",
"goto": "test_look_node"},
{"key": ("{yV{niew", "v"),
"desc": "View your own name",
"goto": "test_view_node"},
@ -717,6 +720,13 @@ def test_start_node(caller):
return text, options
def test_look_node(caller):
text = "Looking again will take you back to the previous message."
options = {"key": ("{yL{nook", "l"),
"desc": "Go back to the previous menu.",
"goto": "test_start_node"}
return text, options
def test_set_node(caller):
text = ("""
The attribute 'menuattrtest' was set to