summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tonkadur_ui.py')
-rw-r--r--tonkadur_ui.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tonkadur_ui.py b/tonkadur_ui.py
index 6fb5b5b..5962b6d 100644
--- a/tonkadur_ui.py
+++ b/tonkadur_ui.py
@@ -87,6 +87,26 @@ try:
print("Input size not within range.")
state.store_string(user_input)
+ elif (result_category == "prompt_command"):
+ while True:
+ user_input = input(
+ display_text(result['label'])
+ + " "
+ + "["
+ + str(result['min'])
+ + ", "
+ + str(result['max'])
+ + "] "
+ )
+ if (
+ (len(user_input) >= result['min'])
+ and (len(user_input) <= result['max'])
+ ):
+ break
+ else:
+ print("Input size not within range.")
+ state.store_command(user_input.split(' '))
+
elif (result_category == "assert"):
print(
"Assert failed at line "