Implicitly support abbreviating commands
[mudpy.git] / mudpy / tests / selftest.py
index b73c13e..520f2fd 100644 (file)
@@ -215,6 +215,12 @@ test_admin_help = (
     (2, "This will save all active accounts", ""),
 )
 
+test_abbrev = (
+    (0, "> ", "help mov"),
+    (0, r"Move in a specific direction\.", "mov north"),
+    (0, r"You exit to the north\.", ""),
+)
+
 test_reload = (
     (2, "> ", "reload"),
     (2, r"Reloading all code modules, configs and data\."
@@ -334,6 +340,7 @@ dialogue = (
     (test_telnet_unknown_option, "log unknown telnet option"),
     (test_admin_restriction, "restricted admin commands"),
     (test_admin_help, "admin help"),
+    (test_abbrev, "command abbreviation"),
     (test_reload, "reload"),
     (test_set_facet, "set facet"),
     (test_set_refused, "refuse altering read-only element"),