Files
Grovewright/game/tests/test_input_setup.gd
T
Steven Wroblewski 9f65823f2d Vitrine der Stilproben
Das Startmenü führt zu einer Vitrine, die den gewählten Stil an einer
kleinen Szene zeigt: Fels, toter und lebendiger Boden, Lebensmoos, eine
Ranke, die Steine in eine erwachende Ruine trägt, eine wachsende
Faserpflanze, ein hüpfendes Weidetier und zwei Spielfiguren. Knöpfe,
die Tasten 1 bis 3 und F2 wechseln den Stil, Esc führt zurück ins Menü.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-02 12:27:26 +02:00

16 lines
627 B
GDScript

extends TestCase
func test_every_action_of_the_game_exists() -> void:
InputSetup.install()
for action in ["move_up", "move_down", "move_left", "move_right", "dig", "save_game", "load_game", "toggle_pause", "next_style", "back", "style_1", "style_2", "style_3"]:
check(InputMap.has_action(action), "action %s" % action)
func test_installing_twice_adds_no_second_set_of_keys() -> void:
InputSetup.install()
var events := InputMap.action_get_events("move_up").size()
InputSetup.install()
check_eq(InputMap.action_get_events("move_up").size(), events, "same number of keys")
check_eq(events, 2, "W and the arrow key")