verify that exact 'name within name' is still unambiguous
1 files changed, 10 insertions(+), 1 deletions(-)

M test/test_cli_commands.py
M test/test_cli_commands.py +10 -1
@@ 48,6 48,11 @@ CMDTABLE_C = {
     'fish': {'target': cmd2, 'opts': [], 'help': 'other stuff'},
     }
 
+CMDTABLE_D = [
+    ('tea', cmd1, '', [], 'FLAVOR TEMP'),
+    ('tear', cmd2, '', [], ''),
+    ]
+
 class TestCliCommands(unittest.TestCase):
 
     def test_parse_cli_cmd(self):

          
@@ 249,7 254,11 @@ class TestCliCommands(unittest.TestCase)
         self.assertRaises(TypeError,
             commander.main, GOPT_A, CMDTABLE_A, 'baz'.split())
         
-
+    def test_fuzzy_names(self):
+        cmd, opts, args = commander.parse(GOPT_A, CMDTABLE_D, 'tear'.split())
+        self.assertEqual(cmd.target, cmd2)
+        cmd, opts, args = commander.parse(GOPT_A, CMDTABLE_D, 'tea'.split())
+        self.assertEqual(cmd.target, cmd1)
 
             
 class Capture(list):